xcp-1.6-updates/xen-4.1.hg

changeset 23309:ce1b489f0543

x86/nmi: Fix deadlock in unknown_nmi_error()

Additionally, correct the text description to reflect what is being
done, and make use of fatal_trap() in preference to kexec_crash() in
case an unknown NMI occurs before a kdump kernel has been loaded.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 25478:6d1a30dc47e8
xen-unstable date: Mon Jun 11 15:12:50 2012 +0100
author Andrew Cooper <andrew.cooper3@citrix.com>
date Tue Jul 03 13:49:32 2012 +0100 (2012-07-03)
parents 0b947d466e3e
children 3fed2c0a282a
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Tue Jul 03 13:48:58 2012 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Tue Jul 03 13:49:32 2012 +0100
     1.3 @@ -3225,7 +3225,7 @@ static void io_check_error(struct cpu_us
     1.4      outb((inb(0x61) & 0x07) | 0x00, 0x61); /* enable IOCK */
     1.5  }
     1.6  
     1.7 -static void unknown_nmi_error(unsigned char reason)
     1.8 +static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
     1.9  {
    1.10      switch ( opt_nmi[0] )
    1.11      {
    1.12 @@ -3234,10 +3234,10 @@ static void unknown_nmi_error(unsigned c
    1.13      case 'i': /* 'ignore' */
    1.14          break;
    1.15      default:  /* 'fatal' */
    1.16 +        console_force_unlock();
    1.17          printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
    1.18 -        printk("Dazed and confused, but trying to continue\n");
    1.19          printk("Do you have a strange power saving mode enabled?\n");
    1.20 -        kexec_crash();
    1.21 +        fatal_trap(TRAP_nmi, regs);
    1.22      }
    1.23  }
    1.24  
    1.25 @@ -3270,7 +3270,7 @@ void do_nmi(struct cpu_user_regs *regs)
    1.26          else if ( reason & 0x40 )
    1.27              io_check_error(regs);
    1.28          else if ( !nmi_watchdog )
    1.29 -            unknown_nmi_error((unsigned char)(reason&0xff));
    1.30 +            unknown_nmi_error(regs, (unsigned char)(reason&0xff));
    1.31      }
    1.32  }
    1.33