diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-01-21 15:36:42 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-01-24 00:40:26 -0200 |
commit | 2f143240cb822c0d23ad591b89fe10e7c1f842f5 (patch) | |
tree | 491859084b1a8dade55c24638fbebcf15c0ea493 /arch/x86/kvm | |
parent | 1f3141e80b149e7215313dff29e9a0c47811b1d1 (diff) | |
download | op-kernel-dev-2f143240cb822c0d23ad591b89fe10e7c1f842f5.zip op-kernel-dev-2f143240cb822c0d23ad591b89fe10e7c1f842f5.tar.gz |
KVM: VMX: reset CPL only on CS register write.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9d2ec88..edfbe94 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3269,7 +3269,8 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu, const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg]; vmx_segment_cache_clear(vmx); - __clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail); + if (seg == VCPU_SREG_CS) + __clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail); if (vmx->rmode.vm86_active && seg != VCPU_SREG_LDTR) { vmx->rmode.segs[seg] = *var; |