|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Reset sp on vcpu_prepare; this avoids 'leaking' stack af
# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 0828f5f18b5609139d171ad64d5119c79ae02fdb
# Parent 260a09e9a9c16f5fede110cd592a11977c599deb
Reset sp on vcpu_prepare; this avoids 'leaking' stack after repeated
save/restore/migrate iterations.
Should fix various crashes observed with save/restore/migrate of multi
VCPU guests.
Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>
diff -r 260a09e9a9c1 -r 0828f5f18b56
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Fri Feb 10 16:14:56 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Fri Feb 10 16:57:13 2006
@@ -176,7 +176,7 @@
#ifdef __i386__
ctxt.user_regs.cs = __KERNEL_CS;
- ctxt.user_regs.esp = idle->thread.esp;
+ ctxt.user_regs.esp = idle->thread.esp0 - sizeof(struct pt_regs);
ctxt.kernel_ss = __KERNEL_DS;
ctxt.kernel_sp = idle->thread.esp0;
@@ -187,9 +187,9 @@
ctxt.failsafe_callback_eip = (unsigned long)failsafe_callback;
ctxt.ctrlreg[3] = virt_to_mfn(swapper_pg_dir) << PAGE_SHIFT;
-#else
+#else /* __x86_64__ */
ctxt.user_regs.cs = __KERNEL_CS | 3;
- ctxt.user_regs.esp = idle->thread.rsp;
+ ctxt.user_regs.esp = idle->thread.rsp0 - sizeof(struct pt_regs);
ctxt.kernel_ss = __KERNEL_DS;
ctxt.kernel_sp = idle->thread.rsp0;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Reset sp on vcpu_prepare; this avoids 'leaking' stack after repeated,
Xen patchbot -unstable <=
|
|
|
|
|