SMP reboot failed with various phenomena such as user level
"unhandled vm exit: 0x80000021 ..." when rebooting SMP RHEL5U
or "execption 8 (0)..." when rebooting XP etc. The reason is that 
we are not correctly reset VCPU. create_vcpu does some initialization
work which should be part of reset job. So reset_vcpu can't do full 
VCPU reset and thus cause AP reboot failure.
        The best approach is to re-org above 2 functions to make it
clear that everything will be re-initialized in vcpu_reset. create_vcpu
probably only allocate memory and do initialization only for those
communicating with user level data structure. while leave others 
including MMU reset to vcpu_reset. For now, let us
use this small patch to fix current issue: GUEST_CR3 in VMCS is
not correctly reseted due to enter_rmode issue.
        With this I get XPSP2 acpi SMP guest reboot successfully
and also SMP Linux RHEL5U.
thanks, eddie





commit 60da97b6de0324a5be1c958b749b33b77cd2b68f
Author: root <[EMAIL PROTECTED](none)>
Date:   Wed Oct 10 14:09:19 2007 +0800

    Reset a SMP guest will force AP enter
    real mode (RESET) probably from paging enabled
    protect mode. While current enter_rmode can
    only handle mode switch from nonpaging mode
    to real mode which leads to SMP reboot failure.
    
    Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>
    Signed-off-by: Qing He <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 382bd6a..ece0aa4 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -1142,6 +1142,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 0537695..2d75599 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1156,6 +1156,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);
 }
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to