Re: [PATCH v2 0/3] Fix task switches into/out of VM86

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

 



On 01/30/2012 03:29 PM, Gleb Natapov wrote:
> On Mon, Jan 30, 2012 at 03:28:07PM +0200, Avi Kivity wrote:
> > On 01/30/2012 02:31 PM, Gleb Natapov wrote:
> > > 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.
> > >
> > 
> > Which check?
> > 
> In vmx_get_cpl().


3A 3.2:

Current privilege level (CPL) field — (Bits 0 and 1 of the CS segment
register.) Indicates the privilege level of the currently executing
program or procedure. The term current privilege level (CPL) refers to
the setting of this field.

(probably allows a library with a low DPL to be run as part of a program
with high RPL/CPL; or you can use a "conforming code segment" as a sort
of SUID bit).

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