summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
authorEddie Dong2007-10-10 08:26:45 +0200
committerAvi Kivity2007-10-22 12:03:28 +0200
commit8668a3c468ed55d19514117a5a959d91d3d03823 (patch)
tree3744b15b77dfdc6457225d69ee76d255b62ff94e /drivers/kvm/vmx.c
parentKVM: VMX: Handle NMIs before enabling interrupts and preemption (diff)
downloadkernel-qcow2-linux-8668a3c468ed55d19514117a5a959d91d3d03823.tar.gz
kernel-qcow2-linux-8668a3c468ed55d19514117a5a959d91d3d03823.tar.xz
kernel-qcow2-linux-8668a3c468ed55d19514117a5a959d91d3d03823.zip
KVM: VMX: Reset mmu context when entering real mode
Resetting an SMP guest will force AP enter real mode (RESET) with paging enabled in protected mode. While current enter_rmode() can only handle mode switch from nonpaging mode to real mode which leads to SMP reboot failure. Fix by reloading the mmu context on entering real mode. Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index bcc1e398a976..f130c01422cf 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1128,6 +1128,7 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
fix_rmode_seg(VCPU_SREG_GS, &vcpu->rmode.gs);
fix_rmode_seg(VCPU_SREG_FS, &vcpu->rmode.fs);
+ kvm_mmu_reset_context(vcpu);
init_rmode_tss(vcpu->kvm);
}