Skip to content

Commit

Permalink
KVM: VMX: Force vm86 mode if setting flags during real mode
Browse files Browse the repository at this point in the history
When resetting from userspace, we need to handle the flags being cleared
even after we are in real mode.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Oct 22, 2007
1 parent a012e65 commit 78f7826
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)

static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
{
if (vcpu->rmode.active)
rflags |= IOPL_MASK | X86_EFLAGS_VM;
vmcs_writel(GUEST_RFLAGS, rflags);
}

Expand Down

0 comments on commit 78f7826

Please sign in to comment.