aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-02 08:30:20 -0400
committerAvi Kivity <avi@redhat.com>2011-05-11 07:56:54 -0400
commitf6e78475894d6534d7d62714a95e2265f53d2a92 (patch)
tree86250a469ccac50490a2d922ee2a1a2d0f5ea915 /arch/x86/kvm/vmx.c
parent0ee8dcb87e403397e575674d0e79272b06dea12e (diff)
KVM: Use kvm_get_rflags() and kvm_set_rflags() instead of the raw versions
Some rflags bits are owned by the host, not guest, so we need to use kvm_get_rflags() to strip those bits away or kvm_set_rflags() to add them back. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 5b4cdcbd154c..d09833e45f6f 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2113,7 +2113,7 @@ static int vmx_get_cpl(struct kvm_vcpu *vcpu)
2113 if (!is_protmode(vcpu)) 2113 if (!is_protmode(vcpu))
2114 return 0; 2114 return 0;
2115 2115
2116 if (vmx_get_rflags(vcpu) & X86_EFLAGS_VM) /* if virtual 8086 */ 2116 if (kvm_get_rflags(vcpu) & X86_EFLAGS_VM) /* if virtual 8086 */
2117 return 3; 2117 return 3;
2118 2118
2119 return vmcs_read16(GUEST_CS_SELECTOR) & 3; 2119 return vmcs_read16(GUEST_CS_SELECTOR) & 3;