]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.xen/xen3-panic-on-io-nmi.diff
Add ignored *.diff files of the xen patches
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.xen / xen3-panic-on-io-nmi.diff
1 From: Kurt Garloff <garloff@suse.de>
2 Subject: [PATCH] X86: sysctl to allow panic on IOCK NMI error
3 References: bnc427979
4
5 This patch introduces a sysctl /proc/sys/kernel/panic_on_io_nmi.,
6 which defaults to 0 (off).
7 When enabled, the kernel panics when the kernel receives an NMI
8 caused by an IO error.
9
10 The IO error triggered NMI indicates a serious system condition,
11 which could result in IO data corruption. Rather than contiuing,
12 panicing and dumping might be a better choice, so one can figure
13 out what's causing the IO error.
14 This could be especially important to companies running IO intensive
15 applications where corruption must be avoided, e.g. a banks databases.
16
17
18 Signed-off-by: Roberto Angelino <robertangelino@gmail.com>
19
20
21 Automatically created from "patches.suse/panic-on-io-nmi.diff" by xen-port-patches.py
22
23 --- sle11-2009-08-26.orig/arch/x86/kernel/traps_32-xen.c 2008-11-25 13:17:09.000000000 +0100
24 +++ sle11-2009-08-26/arch/x86/kernel/traps_32-xen.c 2008-11-25 13:13:12.000000000 +0100
25 @@ -83,6 +83,7 @@ gate_desc idt_table[256]
26 #endif
27
28 int panic_on_unrecovered_nmi;
29 +int panic_on_io_nmi;
30 int kstack_depth_to_print = 24;
31 static unsigned int code_bytes = 64;
32 #ifdef CONFIG_STACK_UNWIND
33 @@ -738,6 +739,9 @@ io_check_error(unsigned char reason, str
34 printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
35 show_registers(regs);
36
37 + if (panic_on_io_nmi)
38 + panic("NMI IOCK error: Not continuing");
39 +
40 /* Re-enable the IOCK line, wait for a few seconds */
41 clear_io_check_error(reason);
42 }
43 --- sle11-2009-08-26.orig/arch/x86/kernel/traps_64-xen.c 2008-11-25 13:17:09.000000000 +0100
44 +++ sle11-2009-08-26/arch/x86/kernel/traps_64-xen.c 2008-11-25 13:13:12.000000000 +0100
45 @@ -56,6 +56,7 @@
46 #include <mach_traps.h>
47
48 int panic_on_unrecovered_nmi;
49 +int panic_on_io_nmi;
50 int kstack_depth_to_print = 12;
51 static unsigned int code_bytes = 64;
52 #ifdef CONFIG_STACK_UNWIND
53 @@ -841,6 +842,9 @@ io_check_error(unsigned char reason, str
54 printk("NMI: IOCK error (debug interrupt?)\n");
55 show_registers(regs);
56
57 + if (panic_on_io_nmi)
58 + panic("NMI IOCK error: Not continuing");
59 +
60 /* Re-enable the IOCK line, wait for a few seconds */
61 clear_io_check_error(reason);
62 }