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] console: allow a panic to be triggered from the xen

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] console: allow a panic to be triggered from the xen console
From: Horms <horms@xxxxxxxxxxxx>
Date: Mon, 15 May 2006 16:47:35 +0900
Cc: Magnus Damm <magnus@xxxxxxxxxxxxx>
Delivery-date: Mon, 15 May 2006 03:25:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11+cvs20060403
console: allow a panic to be triggered from the xen console

I'm not sure how useful this is generally, but
its proving quite useful for me while working on kdump/kexec.

Signed-Off-By: Horms <horms@xxxxxxxxxxxx>

diff -r 91c77df11b43 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Wed May 10 17:30:42 2006 +0100
+++ b/xen/drivers/char/console.c        Mon May 15 15:19:16 2006 +0900
@@ -701,6 +701,19 @@ void panic(const char *fmt, ...)
     machine_restart(0);
 }
 
+static void do_panic_trigger(unsigned char key)
+{
+       printk("triggering panic\n");
+       panic("CPU%d triggered panic\n", smp_processor_id());
+}
+
+static __init int register_panic_trigger(void)
+{
+       register_keyhandler('p', do_panic_trigger, "trigger a panic");
+       return 0;
+}
+__initcall(register_panic_trigger);
+
 /*
  * Local variables:
  * mode: C

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] console: allow a panic to be triggered from the xen console, Horms <=