From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Guthro Subject: [PATCH] Schedule shutdown fix Date: Mon, 10 Mar 2008 15:14:45 -0400 Message-ID: <47D588A5.4040200@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030500080007010103010603" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030500080007010103010603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Signed-off-by: Ben Guthro --------------030500080007010103010603 Content-Type: text/x-patch; name="xen-shutdown-schedule.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-shutdown-schedule.patch" 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) --------------030500080007010103010603 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030500080007010103010603--