From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH 06/11] xen/hvm kexec: unregister shutdown+sysrq watches during reboot
Date: Thu, 28 Jul 2011 15:23:06 +0200 [thread overview]
Message-ID: <20110728132302.126984180@aepfle.de> (raw)
In-Reply-To: 20110728132300.248098023@aepfle.de
[-- Attachment #1: xen.syscore_ops.unregister_watch.shutdown_event.patch --]
[-- Type: text/plain, Size: 1433 bytes --]
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.
v2:
use kexec_is_loaded() function
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
drivers/xen/manage.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Index: linux-3.0/drivers/xen/manage.c
===================================================================
--- linux-3.0.orig/drivers/xen/manage.c
+++ linux-3.0/drivers/xen/manage.c
@@ -8,6 +8,7 @@
#include <linux/sysrq.h>
#include <linux/stop_machine.h>
#include <linux/freezer.h>
+#include <linux/kexec.h>
#include <linux/syscore_ops.h>
#include <xen/xen.h>
@@ -320,6 +321,21 @@ static int shutdown_event(struct notifie
return NOTIFY_DONE;
}
+static void xenbus_manage_shutdown_watcher(void)
+{
+ if (!kexec_is_loaded())
+ return;
+
+ unregister_xenbus_watch(&shutdown_watch);
+#ifdef CONFIG_MAGIC_SYSRQ
+ unregister_xenbus_watch(&sysrq_watch);
+#endif
+}
+
+static struct syscore_ops xenbus_manage_watcher_syscore_ops = {
+ .shutdown = xenbus_manage_shutdown_watcher,
+};
+
int xen_setup_shutdown_event(void)
{
static struct notifier_block xenstore_notifier = {
@@ -329,6 +345,7 @@ int xen_setup_shutdown_event(void)
if (!xen_domain())
return -ENODEV;
register_xenstore_notifier(&xenstore_notifier);
+ register_syscore_ops(&xenbus_manage_watcher_syscore_ops);
return 0;
}
next prev parent reply other threads:[~2011-07-28 13:23 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 13:23 [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Olaf Hering
2011-07-28 13:23 ` [PATCH 01/11] kexec: add kexec_is_loaded function Olaf Hering
2011-07-29 14:45 ` Stefano Stabellini
2011-07-29 17:34 ` Konrad Rzeszutek Wilk
2011-08-01 12:59 ` Olaf Hering
2011-07-28 13:23 ` [PATCH 02/11] xen: remove BUG_ON from xen_teardown_timer Olaf Hering
2011-07-28 13:23 ` [PATCH 03/11] xen: use static initializers in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 04/11] xen/hvm kexec: unregister timer interrupt during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 05/11] xen/hvm kexec: unregister debugirq " Olaf Hering
2011-07-29 17:45 ` Konrad Rzeszutek Wilk
2011-07-28 13:23 ` Olaf Hering [this message]
2011-07-28 13:23 ` [PATCH 07/11] xen/hvm kexec: unregister memory/target watch in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 08/11] xen/hvm kexec: unregister the watch of the "backend" node during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 09/11] xen/hvm kexec: unregister the watch of the "device" " Olaf Hering
2011-07-28 13:23 ` [PATCH 10/11] xen kexec: reset device state to Initializing " Olaf Hering
2011-07-28 13:23 ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Olaf Hering
2011-07-29 14:47 ` Stefano Stabellini
2011-08-01 12:58 ` Olaf Hering
2011-08-02 21:04 ` Stefano Stabellini
2011-08-02 22:20 ` Where can I find current (and up to date) documentation for xen 4.1.1? Mark Schneider
2011-08-02 22:42 ` xen 4.1.1 - errors in xend-debug.log: cat: /sys/bus/scsi/devices/host0/vendor: No such file or directory Mark Schneider
2011-08-02 22:48 ` [2011-08-02 20:54:36 2721] WARNING (XendAPI:708) API call: VBD.set_device not found Mark Schneider
2011-08-02 23:29 ` xen 4.1.1 - Error: Device 0 (vif) could not be connected. Hotplug scripts not working Mark Schneider
2011-08-03 1:02 ` Boris Derzhavets
2011-08-03 8:14 ` Mark Schneider
2011-08-03 16:43 ` Pasi Kärkkäinen
2011-08-03 4:55 ` Where can I find current (and up to date) documentation for xen 4.1.1? Pasi Kärkkäinen
2011-08-09 9:07 ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Ian Campbell
2011-07-28 13:43 ` [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Keir Fraser
2011-08-01 13:00 ` Olaf Hering
2011-07-29 17:35 ` Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110728132302.126984180@aepfle.de \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.