From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/6] xen/hvm kexec: unregister shutdown+sysrq watches during reboot Date: Tue, 26 Jul 2011 10:17:39 -0400 Message-ID: <20110726141739.GD5994@dumpdata.com> References: <20110726115209.655568638@aepfle.de> <20110726115210.329657070@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20110726115210.329657070@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Jul 26, 2011 at 01:52:11PM +0200, Olaf Hering wrote: > Unregister the shutdown and sysrq watch during kexec. The watches can > not be re-registered in the kexec kernel because they are still seen as > busy by xenstore. So this is the PV or HVM guest doing the kexec? > > Signed-off-by: Olaf Hering > > --- > drivers/xen/manage.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > Index: linux-3.0/drivers/xen/manage.c > =================================================================== > --- linux-3.0.orig/drivers/xen/manage.c > +++ linux-3.0/drivers/xen/manage.c > @@ -320,6 +320,18 @@ static int shutdown_event(struct notifie > return NOTIFY_DONE; > } > > +static void xenbus_disable_shutdown_watcher(void) > +{ > + unregister_xenbus_watch(&shutdown_watch); > +#ifdef CONFIG_MAGIC_SYSRQ > + unregister_xenbus_watch(&sysrq_watch); > +#endif > +} > + > +static struct syscore_ops xenbus_watcher_syscore_ops = { > + .shutdown = xenbus_disable_shutdown_watcher, > +}; > + > int xen_setup_shutdown_event(void) > { > static struct notifier_block xenstore_notifier = { > @@ -329,6 +341,7 @@ int xen_setup_shutdown_event(void) > if (!xen_domain()) > return -ENODEV; > register_xenstore_notifier(&xenstore_notifier); > + register_syscore_ops(&xenbus_watcher_syscore_ops); > > return 0; > } > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel