Re: [PATCH 4/6] add syscall emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi Kivity wrote:
On 06/17/2009 04:50 PM, Andre Przywara wrote:

+static inline void
+setup_syscalls_segments(struct x86_emulate_ctxt *ctxt,
+    struct kvm_segment *cs, struct kvm_segment *ss)
+{
+    memset(cs, 0, sizeof(struct kvm_segment));
+    kvm_x86_ops->get_segment(ctxt->vcpu, cs, VCPU_SREG_CS);
+    memset(ss, 0, sizeof(struct kvm_segment));
+
+    cs->l = 0;        /* will be adjusted later */
+    cs->base = 0;        /* flat segment */
+    cs->g = 1;        /* 4kb granularity */
+    cs->limit = 0xfffff;    /* 4GB limit */
...
+    ss->limit = 0xfffff;    /* 4GB limit */

limit in kvm_segment is expanded, so 4GB is 0xffffffff.
You are right. This was probably a leftover from this cross vendor migration g-bit issue. Beside the fix here this removes some code in the separate paths, so I remade patch 4-6/6 and will resend them.

Thanks for spotting this.

Regards,
Andre.

--
Andre Przywara
AMD-OSRC (Dresden)
Tel: x29712

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux