diff -urN xen-2.0/xen/include/public/io/domain_controller.h xen-2.0-sysrq/xen/include/public/io/domain_controller.h --- xen-2.0/xen/include/public/io/domain_controller.h 2004-11-17 22:51:47.000000000 +0000 +++ xen-2.0-sysrq/xen/include/public/io/domain_controller.h 2004-12-03 13:39:43.000000000 +0000 @@ -555,7 +555,8 @@ #define CMSG_SHUTDOWN_REBOOT 1 /* Clean shutdown (SHUTDOWN_reboot). */ #define CMSG_SHUTDOWN_SUSPEND 2 /* Create suspend info, then */ /* SHUTDOWN_suspend. */ - +#define CMSG_SHUTDOWN_SYSRQ_MIN 33 /* Lowest subtype that will be interpreted */ +#define CMSG_SHUTDOWN_SYSRQ_MAX 127 /* as an ASCII sysrq handler (and highest) */ /****************************************************************************** * MEMORY CONTROLS diff -urN xen-2.0/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c xen-2.0-sysrq/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c --- xen-2.0/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c 2004-11-17 22:51:41.000000000 +0000 +++ xen-2.0-sysrq/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c 2004-12-03 14:03:58.000000000 +0000 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -226,6 +227,15 @@ shutting_down = msg->subtype; schedule_work(&shutdown_work); } + else if (msg->subtype >= CMSG_SHUTDOWN_SYSRQ_MIN && + msg->subtype <= CMSG_SHUTDOWN_SYSRQ_MAX) + { +#ifdef CONFIG_MAGIC_SYSRQ + handle_sysrq(msg->subtype, NULL, NULL); +#else + printk("sysrq not supported\n"); +#endif + } else { printk("Ignore spurious shutdown request\n");