WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux-2.6.18: don't register shutdown watch and susp

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux-2.6.18: don't register shutdown watch and suspend event channel for Dom0
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 16 Nov 2010 07:36:12 +0000
Delivery-date: Mon, 15 Nov 2010 23:38:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This pointlessly consumes resources and poses the risk of either
getting triggered inadvertently.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/drivers/xen/core/reboot.c
+++ b/drivers/xen/core/reboot.c
@@ -280,6 +280,15 @@ static int setup_shutdown_watcher(void)
 {
        int err;
 
+       err = register_xenbus_watch(&sysrq_watch);
+       if (err) {
+               printk(KERN_ERR "Failed to set sysrq watcher\n");
+               return err;
+       }
+
+       if (is_initial_xendomain())
+               return 0;
+
        xenbus_scanf(XBT_NIL, "control",
                     "platform-feature-multiprocessor-suspend",
                     "%d", &fast_suspend);
@@ -290,12 +299,6 @@ static int setup_shutdown_watcher(void)
                return err;
        }
 
-       err = register_xenbus_watch(&sysrq_watch);
-       if (err) {
-               printk(KERN_ERR "Failed to set sysrq watcher\n");
-               return err;
-       }
-
        /* suspend event channel */
        err = setup_suspend_evtchn();
        if (err) {



Attachment: xen-dom0-no-suspend.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux-2.6.18: don't register shutdown watch and suspend event channel for Dom0, Jan Beulich <=