mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
[XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
c69ab9d431
commit
a4cd20a190
1 file changed
+10
-3
+10
-3
@@ -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)
|
||||
|
||||