Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8668a3c468ed55d19514117a5a959d91d3d03823
Commit:     8668a3c468ed55d19514117a5a959d91d3d03823
Parent:     1b6269db3f83396c2fd2c8d0f3e0f37ac0e6ba05
Author:     Eddie Dong <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 14:26:45 2007 +0800
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Mon Oct 22 12:03:28 2007 +0200

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Qing He <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/mmu.c |    1 +
 drivers/kvm/vmx.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 7171618..feb5ac9 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -1049,6 +1049,7 @@ int kvm_mmu_reset_context(struct kvm_vcpu *vcpu)
        destroy_kvm_mmu(vcpu);
        return init_kvm_mmu(vcpu);
 }
+EXPORT_SYMBOL_GPL(kvm_mmu_reset_context);
 
 int kvm_mmu_load(struct kvm_vcpu *vcpu)
 {
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index bcc1e39..f130c01 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);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to