direct-io.hg

changeset 10446:f3561b1ee7a3

[XEN] Rename show_registers() to show_execution_state().
This makes more sense since it dumps stack as well as
registers. show_registers() still exists; it simply doesn't
dump the stack any more.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@dhcp93.uk.xensource.com
date Mon Jun 19 11:44:25 2006 +0100 (2006-06-19)
parents 8d75d4e0af1e
children f7eb907d9bcd
files xen/arch/x86/traps.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c xen/common/domain.c xen/common/keyhandler.c xen/include/asm-ia64/debugger.h xen/include/asm-ia64/vmx.h xen/include/asm-x86/hvm/support.h xen/include/asm-x86/processor.h
line diff
     1.1 --- a/xen/arch/x86/traps.c	Mon Jun 19 11:21:40 2006 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Mon Jun 19 11:44:25 2006 +0100
     1.3 @@ -306,6 +306,12 @@ void show_stack_overflow(unsigned long e
     1.4  #endif
     1.5  }
     1.6  
     1.7 +void show_execution_state(struct cpu_user_regs *regs)
     1.8 +{
     1.9 +    show_registers(regs);
    1.10 +    show_stack(regs);
    1.11 +}
    1.12 +
    1.13  /*
    1.14   * This is called for faults at very unexpected times (e.g., when interrupts
    1.15   * are disabled). In such situations we can't do much that is safe. We try to
    1.16 @@ -327,7 +333,7 @@ asmlinkage void fatal_trap(int trapnr, s
    1.17      watchdog_disable();
    1.18      console_start_sync();
    1.19  
    1.20 -    show_registers(regs);
    1.21 +    show_execution_state(regs);
    1.22  
    1.23      if ( trapnr == TRAP_page_fault )
    1.24      {
    1.25 @@ -390,7 +396,7 @@ static inline int do_trap(int trapnr, ch
    1.26  
    1.27      DEBUGGER_trap_fatal(trapnr, regs);
    1.28  
    1.29 -    show_registers(regs);
    1.30 +    show_execution_state(regs);
    1.31      panic("CPU%d FATAL TRAP: vector = %d (%s)\n"
    1.32            "[error_code=%04x]\n",
    1.33            smp_processor_id(), trapnr, str, regs->error_code);
    1.34 @@ -482,7 +488,7 @@ asmlinkage int do_invalid_op(struct cpu_
    1.35      if ( unlikely(!guest_mode(regs)) )
    1.36      {
    1.37          DEBUGGER_trap_fatal(TRAP_invalid_op, regs);
    1.38 -        show_registers(regs);
    1.39 +        show_execution_state(regs);
    1.40          panic("CPU%d FATAL TRAP: vector = %d (invalid opcode)\n",
    1.41                smp_processor_id(), TRAP_invalid_op);
    1.42      }
    1.43 @@ -511,7 +517,7 @@ asmlinkage int do_int3(struct cpu_user_r
    1.44      if ( !guest_mode(regs) )
    1.45      {
    1.46          DEBUGGER_trap_fatal(TRAP_int3, regs);
    1.47 -        show_registers(regs);
    1.48 +        show_execution_state(regs);
    1.49          panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id());
    1.50      } 
    1.51  
    1.52 @@ -791,7 +797,7 @@ asmlinkage int do_page_fault(struct cpu_
    1.53  
    1.54          DEBUGGER_trap_fatal(TRAP_page_fault, regs);
    1.55  
    1.56 -        show_registers(regs);
    1.57 +        show_execution_state(regs);
    1.58          show_page_walk(addr);
    1.59          panic("CPU%d FATAL PAGE FAULT\n"
    1.60                "[error_code=%04x]\n"
    1.61 @@ -1356,7 +1362,7 @@ asmlinkage int do_general_protection(str
    1.62      DEBUGGER_trap_fatal(TRAP_gp_fault, regs);
    1.63  
    1.64   hardware_gp:
    1.65 -    show_registers(regs);
    1.66 +    show_execution_state(regs);
    1.67      panic("CPU%d GENERAL PROTECTION FAULT\n[error_code=%04x]\n",
    1.68            smp_processor_id(), regs->error_code);
    1.69      return 0;
     2.1 --- a/xen/arch/x86/x86_32/traps.c	Mon Jun 19 11:21:40 2006 +0100
     2.2 +++ b/xen/arch/x86/x86_32/traps.c	Mon Jun 19 11:44:25 2006 +0100
     2.3 @@ -68,8 +68,6 @@ void show_registers(struct cpu_user_regs
     2.4             "ss: %04x   cs: %04x\n",
     2.5             fault_regs.ds, fault_regs.es, fault_regs.fs,
     2.6             fault_regs.gs, fault_regs.ss, fault_regs.cs);
     2.7 -
     2.8 -    show_stack(regs);
     2.9  }
    2.10  
    2.11  void show_page_walk(unsigned long addr)
     3.1 --- a/xen/arch/x86/x86_64/traps.c	Mon Jun 19 11:21:40 2006 +0100
     3.2 +++ b/xen/arch/x86/x86_64/traps.c	Mon Jun 19 11:44:25 2006 +0100
     3.3 @@ -21,7 +21,7 @@
     3.4  
     3.5  #include <public/callback.h>
     3.6  
     3.7 -static void __show_registers(struct cpu_user_regs *regs)
     3.8 +void show_registers(struct cpu_user_regs *regs)
     3.9  {
    3.10      struct cpu_user_regs fault_regs = *regs;
    3.11      unsigned long fault_crs[8];
    3.12 @@ -70,12 +70,6 @@ static void __show_registers(struct cpu_
    3.13             fault_regs.gs, fault_regs.ss, fault_regs.cs);
    3.14  }
    3.15  
    3.16 -void show_registers(struct cpu_user_regs *regs)
    3.17 -{
    3.18 -    __show_registers(regs);
    3.19 -    show_stack(regs);
    3.20 -}
    3.21 -
    3.22  void show_page_walk(unsigned long addr)
    3.23  {
    3.24      unsigned long pfn, mfn = read_cr3() >> PAGE_SHIFT;
    3.25 @@ -128,7 +122,7 @@ asmlinkage void do_double_fault(struct c
    3.26  
    3.27      /* Find information saved during fault and dump it to the console. */
    3.28      printk("************************************\n");
    3.29 -    __show_registers(regs);
    3.30 +    show_registers(regs);
    3.31      show_stack_overflow(regs->rsp);
    3.32      printk("************************************\n");
    3.33      printk("CPU%d DOUBLE FAULT -- system shutdown\n", smp_processor_id());
     4.1 --- a/xen/common/domain.c	Mon Jun 19 11:21:40 2006 +0100
     4.2 +++ b/xen/common/domain.c	Mon Jun 19 11:44:25 2006 +0100
     4.3 @@ -234,7 +234,7 @@ void __domain_crash(struct domain *d)
     4.4      {
     4.5          printk("Domain %d (vcpu#%d) crashed on cpu#%d:\n",
     4.6                 d->domain_id, current->vcpu_id, smp_processor_id());
     4.7 -        show_registers(guest_cpu_user_regs());
     4.8 +        show_execution_state(guest_cpu_user_regs());
     4.9      }
    4.10      else
    4.11      {
     5.1 --- a/xen/common/keyhandler.c	Mon Jun 19 11:21:40 2006 +0100
     5.2 +++ b/xen/common/keyhandler.c	Mon Jun 19 11:44:25 2006 +0100
     5.3 @@ -90,7 +90,7 @@ static void show_handlers(unsigned char 
     5.4  static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
     5.5  {
     5.6      printk("'%c' pressed -> dumping registers\n", key); 
     5.7 -    show_registers(regs); 
     5.8 +    show_execution_state(regs); 
     5.9  }
    5.10  
    5.11  static void halt_machine(unsigned char key, struct cpu_user_regs *regs)
     6.1 --- a/xen/include/asm-ia64/debugger.h	Mon Jun 19 11:21:40 2006 +0100
     6.2 +++ b/xen/include/asm-ia64/debugger.h	Mon Jun 19 11:44:25 2006 +0100
     6.3 @@ -41,6 +41,7 @@
     6.4  #include <xen/gdbstub.h>
     6.5  
     6.6  void show_registers(struct cpu_user_regs *regs);
     6.7 +#define show_execution_state show_registers
     6.8  
     6.9  // NOTE: on xen struct pt_regs = struct cpu_user_regs
    6.10  //       see include/asm-ia64/linux-xen/asm/ptrace.h
     7.1 --- a/xen/include/asm-ia64/vmx.h	Mon Jun 19 11:21:40 2006 +0100
     7.2 +++ b/xen/include/asm-ia64/vmx.h	Mon Jun 19 11:44:25 2006 +0100
     7.3 @@ -42,6 +42,7 @@ extern int ia64_hypercall (struct pt_reg
     7.4  extern void vmx_save_state(struct vcpu *v);
     7.5  extern void vmx_load_state(struct vcpu *v);
     7.6  extern void show_registers(struct pt_regs *regs);
     7.7 +#define show_execution_state show_registers
     7.8  extern int vmx_build_physmap_table(struct domain *d);
     7.9  extern unsigned long __gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
    7.10  extern void sync_split_caches(void);
     8.1 --- a/xen/include/asm-x86/hvm/support.h	Mon Jun 19 11:21:40 2006 +0100
     8.2 +++ b/xen/include/asm-x86/hvm/support.h	Mon Jun 19 11:44:25 2006 +0100
     8.3 @@ -132,7 +132,7 @@ extern unsigned int opt_hvm_debug_level;
     8.4  #define  __hvm_bug(regs)                                        \
     8.5      do {                                                        \
     8.6          printk("__hvm_bug at %s:%d\n", __FILE__, __LINE__);     \
     8.7 -        show_registers(regs);                                   \
     8.8 +        show_execution_state(regs);                             \
     8.9          domain_crash_synchronous();                             \
    8.10      } while (0)
    8.11  
     9.1 --- a/xen/include/asm-x86/processor.h	Mon Jun 19 11:21:40 2006 +0100
     9.2 +++ b/xen/include/asm-x86/processor.h	Mon Jun 19 11:44:25 2006 +0100
     9.3 @@ -531,6 +531,7 @@ extern always_inline void prefetchw(cons
     9.4  void show_stack(struct cpu_user_regs *regs);
     9.5  void show_stack_overflow(unsigned long esp);
     9.6  void show_registers(struct cpu_user_regs *regs);
     9.7 +void show_execution_state(struct cpu_user_regs *regs);
     9.8  void show_page_walk(unsigned long addr);
     9.9  asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs);
    9.10