Re: [PATCH] When switching to a vm8086 task, load segments as 16-bit

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

 



On 08/11/2009 07:45 PM, Anthony Liguori wrote:
Avi Kivity wrote:
On 08/11/2009 04:00 AM, Anthony Liguori wrote:

kvm_load_segment_descriptor() can already load plain segments:

    if (!(vcpu->arch.cr0 & X86_CR0_PE))
        return kvm_load_realmode_segment(vcpu, selector, seg);

so we can simplify the patch a bit by extending the check.

I went down that road but you need to check the to-be-switched-into tss, which isn't available directly from vcpu so we would have to either pass the tss as a parameter to the function or at least a flag indicating that we're going into vm8086 mode.


eflags is already updated at this point, so no need for an additional parameter.

There are other callers of kvm_load_segment_descriptor that would need updating and it already takes a few extra parameters. That's why I went down this road.

The other callers are a good reason to do it in kvm_load_segment_descriptor(), so they don't have to perform the check themselves. In fact with this change your patch will fix a few more bugs.

--
error compiling committee.c: too many arguments to function

--
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