diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-01-12 17:39:26 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-01-12 17:39:26 +0000 |
commit | a4cd20a19073f01de2be2254fc8274a3d4e537b1 (patch) | |
tree | e91d37803993307685b191a0943309ec4b6b0b1b /xen/common | |
parent | c69ab9d4310bfe374aa6354bd9afcf412c3dec8f (diff) | |
download | xen-a4cd20a19073f01de2be2254fc8274a3d4e537b1.tar.gz xen-a4cd20a19073f01de2be2254fc8274a3d4e537b1.tar.bz2 xen-a4cd20a19073f01de2be2254fc8274a3d4e537b1.zip |
[XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common')
-rw-r--r-- | xen/common/keyhandler.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 3b5aeb05e2..244273addf 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -95,6 +95,11 @@ static void show_handlers(unsigned char key) static void __dump_execstate(void *unused) { dump_execution_state(); + printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id()); + if ( is_idle_vcpu(current) ) + printk("No guest context (CPU is idle).\n"); + else + show_execution_state(guest_cpu_user_regs()); } static void dump_registers(unsigned char key, struct cpu_user_regs *regs) @@ -104,16 +109,18 @@ static void dump_registers(unsigned char key, struct cpu_user_regs *regs) printk("'%c' pressed -> dumping registers\n", key); /* Get local execution state out immediately, in case we get stuck. */ - printk("\n*** Dumping CPU%d state: ***\n", smp_processor_id()); - show_execution_state(regs); + printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id()); + __dump_execstate(NULL); for_each_online_cpu ( cpu ) { if ( cpu == smp_processor_id() ) continue; - printk("\n*** Dumping CPU%d state: ***\n", cpu); + printk("\n*** Dumping CPU%d host state: ***\n", cpu); on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1); } + + printk("\n"); } static void halt_machine(unsigned char key, struct cpu_user_regs *regs) |