ia64/xen-unstable

changeset 13423:ba239a4a7c3f

[XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Jan 12 17:39:26 2007 +0000 (2007-01-12)
parents e5ded8fe74ad
children a8f62eb194e3
files xen/common/keyhandler.c
line diff
     1.1 --- a/xen/common/keyhandler.c	Fri Jan 12 17:16:45 2007 +0000
     1.2 +++ b/xen/common/keyhandler.c	Fri Jan 12 17:39:26 2007 +0000
     1.3 @@ -95,6 +95,11 @@ static void show_handlers(unsigned char 
     1.4  static void __dump_execstate(void *unused)
     1.5  {
     1.6      dump_execution_state();
     1.7 +    printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id());
     1.8 +    if ( is_idle_vcpu(current) )
     1.9 +        printk("No guest context (CPU is idle).\n");
    1.10 +    else
    1.11 +        show_execution_state(guest_cpu_user_regs());
    1.12  }
    1.13  
    1.14  static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
    1.15 @@ -104,16 +109,18 @@ static void dump_registers(unsigned char
    1.16      printk("'%c' pressed -> dumping registers\n", key);
    1.17  
    1.18      /* Get local execution state out immediately, in case we get stuck. */
    1.19 -    printk("\n*** Dumping CPU%d state: ***\n", smp_processor_id());
    1.20 -    show_execution_state(regs);
    1.21 +    printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id());
    1.22 +    __dump_execstate(NULL);
    1.23  
    1.24      for_each_online_cpu ( cpu )
    1.25      {
    1.26          if ( cpu == smp_processor_id() )
    1.27              continue;
    1.28 -        printk("\n*** Dumping CPU%d state: ***\n", cpu);
    1.29 +        printk("\n*** Dumping CPU%d host state: ***\n", cpu);
    1.30          on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
    1.31      }
    1.32 +
    1.33 +    printk("\n");
    1.34  }
    1.35  
    1.36  static void halt_machine(unsigned char key, struct cpu_user_regs *regs)