mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
a012e65aee
commit
78f7826868
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
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);
|
vmcs_writel(GUEST_RFLAGS, rflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue