On Mon, Jan 30, 2012 at 01:59:34PM +0200, Avi Kivity wrote:
> > > It's best to make it independent (like svm, and force vmx to emulate
> > > this behaviour). Real mode forces cpl to 0, vm86 forces cpl to 3,
> > > protected mode (and I think long mode) uses cs.rpl.
> > This is what vmx does, not svm.
>
> That's the architectural definition, except for mode switch sequences.
> vmx implements it directly which means that mode switch sequences
> sometimes fail, either in guest software (setting cr0.pe while cs & 3 !=
> 0) or in "microcode" (emulate.c).
>
The fact that vmx check for cpl by (cs & 3) looks incorrect. It
should check dpl.
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html