Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78f78268 authored by Avi Kivity's avatar Avi Kivity
Browse files

KVM: VMX: Force vm86 mode if setting flags during real mode



When resetting from userspace, we need to handle the flags being cleared
even after we are in real mode.

Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent a012e65a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}