[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] console: allow a panic to be triggered from the xen console


this is a resend of this patch, which I believe is a simple but
useful feature. I have used it extensively to test the kdump
patches which I have been developing with my colleague Magnus Damm.
It is probably useful for other purposes too, and is analogous
to the trigger crashdump feature of Linux's sysrq.


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, ...)
+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;
  * Local variables:
  * mode: C

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.