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.

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.

Happy to change though if you'd prefer a different approach.

--
Regards,

Anthony Liguori

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

Reply via email to