aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index bb56ae3f89b6..5b397b6c9f93 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -524,7 +524,7 @@ static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)
524static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) 524static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
525{ 525{
526 if (vcpu->rmode.active) 526 if (vcpu->rmode.active)
527 rflags |= IOPL_MASK | X86_EFLAGS_VM; 527 rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
528 vmcs_writel(GUEST_RFLAGS, rflags); 528 vmcs_writel(GUEST_RFLAGS, rflags);
529} 529}
530 530
@@ -1050,7 +1050,7 @@ static void enter_pmode(struct kvm_vcpu *vcpu)
1050 vmcs_write32(GUEST_TR_AR_BYTES, vcpu->rmode.tr.ar); 1050 vmcs_write32(GUEST_TR_AR_BYTES, vcpu->rmode.tr.ar);
1051 1051
1052 flags = vmcs_readl(GUEST_RFLAGS); 1052 flags = vmcs_readl(GUEST_RFLAGS);
1053 flags &= ~(IOPL_MASK | X86_EFLAGS_VM); 1053 flags &= ~(X86_EFLAGS_IOPL | X86_EFLAGS_VM);
1054 flags |= (vcpu->rmode.save_iopl << IOPL_SHIFT); 1054 flags |= (vcpu->rmode.save_iopl << IOPL_SHIFT);
1055 vmcs_writel(GUEST_RFLAGS, flags); 1055 vmcs_writel(GUEST_RFLAGS, flags);
1056 1056
@@ -1107,9 +1107,9 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
1107 vmcs_write32(GUEST_TR_AR_BYTES, 0x008b); 1107 vmcs_write32(GUEST_TR_AR_BYTES, 0x008b);
1108 1108
1109 flags = vmcs_readl(GUEST_RFLAGS); 1109 flags = vmcs_readl(GUEST_RFLAGS);
1110 vcpu->rmode.save_iopl = (flags & IOPL_MASK) >> IOPL_SHIFT; 1110 vcpu->rmode.save_iopl = (flags & X86_EFLAGS_IOPL) >> IOPL_SHIFT;
1111 1111
1112 flags |= IOPL_MASK | X86_EFLAGS_VM; 1112 flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
1113 1113
1114 vmcs_writel(GUEST_RFLAGS, flags); 1114 vmcs_writel(GUEST_RFLAGS, flags);
1115 vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME); 1115 vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);