* [PATCH] Schedule shutdown fix
@ 2008-03-10 19:14 Ben Guthro
2008-03-10 19:31 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Ben Guthro @ 2008-03-10 19:14 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
domain_shutdown() needs to call raise_softirq(SCHEDULE_SOFTIRQ).
This forces the current vcpu to be rescheduled and paused.
Without this, during live migrate, if another vcpu has defer_shutdown==1
then the current vcpu can return from domain_shutdown(),
do a vmenter, and continue running guest code, "resume" code that
should only be running on the receiving node!
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
[-- Attachment #2: xen-shutdown-schedule.patch --]
[-- Type: text/x-patch, Size: 310 bytes --]
diff -r 4674efa621d4 xen/common/domain.c
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -415,6 +415,7 @@ void domain_shutdown(struct domain *d, u
__domain_finalise_shutdown(d);
spin_unlock(&d->shutdown_lock);
+ raise_softirq(SCHEDULE_SOFTIRQ);
}
void domain_resume(struct domain *d)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Schedule shutdown fix
2008-03-10 19:14 [PATCH] Schedule shutdown fix Ben Guthro
@ 2008-03-10 19:31 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2008-03-10 19:31 UTC (permalink / raw)
To: Ben Guthro, xen-devel
Probably better fixed by calling vcpu_sleep_nosync() a bit more
aggressively. I'll sort out a fix based around that. Nice catch!
-- Keir
On 10/3/08 19:14, "Ben Guthro" <bguthro@virtualiron.com> wrote:
> domain_shutdown() needs to call raise_softirq(SCHEDULE_SOFTIRQ).
> This forces the current vcpu to be rescheduled and paused.
> Without this, during live migrate, if another vcpu has defer_shutdown==1
> then the current vcpu can return from domain_shutdown(),
> do a vmenter, and continue running guest code, "resume" code that
> should only be running on the receiving node!
>
> Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
> Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
> diff -r 4674efa621d4 xen/common/domain.c
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -415,6 +415,7 @@ void domain_shutdown(struct domain *d, u
> __domain_finalise_shutdown(d);
>
> spin_unlock(&d->shutdown_lock);
> + raise_softirq(SCHEDULE_SOFTIRQ);
> }
>
> void domain_resume(struct domain *d)
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-10 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10 19:14 [PATCH] Schedule shutdown fix Ben Guthro
2008-03-10 19:31 ` Keir Fraser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.