diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-06-12 16:55:09 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-06-12 16:55:09 +0100 |
commit | aadeb224555dd5c9292e316f7608c4b5daeb8835 (patch) | |
tree | a34951a180c84a51558d408cdc789539298afd47 /xen/common/keyhandler.c | |
parent | a7bf85780578b98d71de4090efd30fbed0ed9291 (diff) | |
download | xen-aadeb224555dd5c9292e316f7608c4b5daeb8835.tar.gz xen-aadeb224555dd5c9292e316f7608c4b5daeb8835.tar.bz2 xen-aadeb224555dd5c9292e316f7608c4b5daeb8835.zip |
dom0 state dump
Since xenctx cannot (for obvious reasons) display the context of
dom0's vCPU-s, here are the beginnings of a console based mechanism to
achieve the same (useful if dom0 hangs with one or more de-scheduled
vCPU-s). The stack handling obviously needs improvement, but the
register context should come out fine in all cases.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/keyhandler.c')
-rw-r--r-- | xen/common/keyhandler.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 9194273322..2acd17ae7b 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -127,6 +127,19 @@ static void dump_registers(unsigned char key, struct cpu_user_regs *regs) console_end_sync(); } +static void dump_dom0_registers(unsigned char key) +{ + struct vcpu *v; + + if ( dom0 == NULL ) + return; + + printk("'%c' pressed -> dumping Dom0's registers\n", key); + + for_each_vcpu ( dom0, v ) + vcpu_show_execution_state(v); +} + static void halt_machine(unsigned char key, struct cpu_user_regs *regs) { printk("'%c' pressed -> rebooting machine\n", key); @@ -312,6 +325,9 @@ void __init initialize_keytable(void) 'P', perfc_reset, "reset performance counters"); #endif + register_keyhandler( + '0', dump_dom0_registers, "dump Dom0 registers"); + register_irq_keyhandler('%', do_debug_key, "Trap to xendbg"); } |