提交 78f78268 编写于 作者: A Avi Kivity

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: NAvi Kivity <avi@qumranet.com>
上级 a012e65a
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册