Re: [Qemu-devel] [PATCH] KVM: x86: get/set CPL separately from CS

2014-05-14 Thread Paolo Bonzini
Il 13/05/2014 17:04, Paolo Bonzini ha scritto: KVM used to assume that CS.RPL could always be used as the CPL value when KVM_SET_SREGS is called. QEMU could call KVM_GET_SREGS and the KVM_SET_SREGS exactly after CR0.PE has been set to 1, but before the long jump that reloads CS. Then, KVM would

[Qemu-devel] [PATCH] KVM: x86: get/set CPL separately from CS

2014-05-13 Thread Paolo Bonzini
KVM used to assume that CS.RPL could always be used as the CPL value when KVM_SET_SREGS is called. QEMU could call KVM_GET_SREGS and the KVM_SET_SREGS exactly after CR0.PE has been set to 1, but before the long jump that reloads CS. Then, KVM would reset the CPL to bits 0-1 of CS (aka CS.RPL). T