ia64/xen-unstable

changeset 11731:74855cdc4a1d

[XEN] Never crash machine on int3 traps.
Do not enter debugger on dom0 shutdown unless dom0 crashed.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 04 09:10:17 2006 +0100 (2006-10-04)
parents 38f9bd7a4ce6
children 7a7e8cf9a4f9
files xen/common/shutdown.c xen/include/asm-x86/debugger.h
line diff
     1.1 --- a/xen/common/shutdown.c	Tue Oct 03 11:39:22 2006 +0100
     1.2 +++ b/xen/common/shutdown.c	Wed Oct 04 09:10:17 2006 +0100
     1.3 @@ -30,8 +30,6 @@ static void maybe_reboot(void)
     1.4  
     1.5  void dom0_shutdown(u8 reason)
     1.6  {
     1.7 -    debugger_trap_immediate();
     1.8 -
     1.9      switch ( reason )
    1.10      {
    1.11      case SHUTDOWN_poweroff:
    1.12 @@ -43,6 +41,7 @@ void dom0_shutdown(u8 reason)
    1.13  
    1.14      case SHUTDOWN_crash:
    1.15      {
    1.16 +        debugger_trap_immediate();
    1.17          printk("Domain 0 crashed: ");
    1.18          maybe_reboot();
    1.19          break; /* not reached */
     2.1 --- a/xen/include/asm-x86/debugger.h	Tue Oct 03 11:39:22 2006 +0100
     2.2 +++ b/xen/include/asm-x86/debugger.h	Wed Oct 04 09:10:17 2006 +0100
     2.3 @@ -46,7 +46,8 @@
     2.4  static inline int debugger_trap_fatal(
     2.5      unsigned int vector, struct cpu_user_regs *regs)
     2.6  {
     2.7 -    return (__trap_to_gdb(regs, vector) == 0);
     2.8 +    int rc = __trap_to_gdb(regs, vector);
     2.9 +    return ((rc == 0) || (vector == TRAP_int3));
    2.10  }
    2.11  
    2.12  /* Int3 is a trivial way to gather cpu_user_regs context. */