public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* SMP reboot issue
@ 2007-10-10  6:26 Dong, Eddie
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A02364257-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dong, Eddie @ 2007-10-10  6:26 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel

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 <root@vt32-pae.(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 <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
    Signed-off-by: Qing He <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: SMP reboot issue
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A02364257-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-10-10 10:26   ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-10-10 10:26 UTC (permalink / raw)
  To: Dong, Eddie; +Cc: kvm-devel

Dong, Eddie wrote:
> 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
>
>
>   

Applied, thanks,

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-10 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10  6:26 SMP reboot issue Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A02364257-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-10 10:26   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox