|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-devel
Re: [Xen-devel] [PATCH 2/6] xen/hvm kexec: unregister	shutdown+sysrq wat 
| | >>> On 26.07.11 at 13:52, Olaf Hering <olaf@xxxxxxxxx> 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.
 
 This and subsequent patches don't look right to me from a conceptual
 pov: If the kexec attempt is due to a crash, the dying kernel should be
 doing as little as possible, and the new kernel should really do the
 cleanup. The more logic gets added to the shutdown path of the old
 kernel, the more likely it'll become that the kexec attempt will fail.
 
 If this requires changes outside the kernel (e.g. state reset helpers
 in hypervisor or tools) - so be it.
 
 Jan
 
 > Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
 >
 > ---
 >  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@xxxxxxxxxxxxxxxxxxx
 > http://lists.xensource.com/xen-devel
 
 
 
 | 
 _______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
Re: [Xen-devel] [PATCH 2/6] xen/hvm kexec: unregister	shutdown+sysrq watches during reboot,
Jan Beulich <=
 |  |  | 
  
    |  |  |