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-changelog

[Xen-changelog] Make sysrq work.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Make sysrq work.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 29 Mar 2005 00:57:29 +0000
Delivery-date: Tue, 29 Mar 2005 08:06:21 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1806.1.1, 2005/03/29 00:57:29+00:00, mwilli2@xxxxxxxxxxxxxxxxxxxx

        Make sysrq work.
        
        Signed-off-by: <mark.williamson@xxxxxxxxxxxx>



 linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c |    2 +-
 tools/python/xen/lowlevel/xu/xu.c                |    3 +++
 xen/include/public/io/domain_controller.h        |    4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-29 03:06:19 
-05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-29 03:06:19 
-05:00
@@ -242,7 +242,7 @@
     else if ( (pending_sysrq == -1) && 
               (msg->subtype == CMSG_SHUTDOWN_SYSRQ) )
     {
-        pending_sysrq = msg->msg[0];
+        pending_sysrq = ((shutdown_sysrq_t *)&msg->msg[0])->key;
         schedule_work(&sysrq_work);
     }
     else
diff -Nru a/tools/python/xen/lowlevel/xu/xu.c 
b/tools/python/xen/lowlevel/xu/xu.c
--- a/tools/python/xen/lowlevel/xu/xu.c 2005-03-29 03:06:19 -05:00
+++ b/tools/python/xen/lowlevel/xu/xu.c 2005-03-29 03:06:19 -05:00
@@ -671,6 +671,9 @@
         P2C(mem_request_t, target, u32);
         P2C(mem_request_t, status, u32);
         break;
+    case TYPE(CMSG_SHUTDOWN, CMSG_SHUTDOWN_SYSRQ):
+        P2C(shutdown_sysrq_t, key, char);
+        break;
     }
 
     if ( dict_items_parsed != PyDict_Size(payload) )
diff -Nru a/xen/include/public/io/domain_controller.h 
b/xen/include/public/io/domain_controller.h
--- a/xen/include/public/io/domain_controller.h 2005-03-29 03:06:19 -05:00
+++ b/xen/include/public/io/domain_controller.h 2005-03-29 03:06:19 -05:00
@@ -545,6 +545,10 @@
                                     /* SHUTDOWN_suspend.                     */
 #define CMSG_SHUTDOWN_SYSRQ     3
 
+typedef struct {
+    char key;      /* 0: sysrq key */
+    char __pad[3]; /* 1: */
+} PACKED shutdown_sysrq_t; /* 4 bytes */
 
 /******************************************************************************
  * MEMORY CONTROLS

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>