diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-21 15:10:04 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-21 15:10:04 +0100 |
commit | 814685710454a2061ac4e5941d3eb6acda5ea6b1 (patch) | |
tree | 37ae2f7b7c9ac9ff855cb63f1bd0f7ad4213a15e /xen/arch/x86/x86_64/traps.c | |
parent | d8b6ccfe2d40d2964feb992bf2026957c54e982a (diff) | |
download | xen-814685710454a2061ac4e5941d3eb6acda5ea6b1.tar.gz xen-814685710454a2061ac4e5941d3eb6acda5ea6b1.tar.bz2 xen-814685710454a2061ac4e5941d3eb6acda5ea6b1.zip |
x86: machine check exception handling
Properly handle MCE (connecting the exisiting, but so far unused
vendor specific handlers). HVM guests don't own CR4.MCE (and hence
can't suppress the exception) anymore, preventing silent machine
shutdown.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/x86_64/traps.c')
-rw-r--r-- | xen/arch/x86/x86_64/traps.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index 6b14040a14..cd45d756cf 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -294,8 +294,9 @@ void __init percpu_traps_init(void) { /* Specify dedicated interrupt stacks for NMIs and double faults. */ set_intr_gate(TRAP_double_fault, &double_fault); - idt_table[TRAP_double_fault].a |= 1UL << 32; /* IST1 */ - idt_table[TRAP_nmi].a |= 2UL << 32; /* IST2 */ + idt_table[TRAP_double_fault].a |= 1UL << 32; /* IST1 */ + idt_table[TRAP_nmi].a |= 2UL << 32; /* IST2 */ + idt_table[TRAP_machine_check].a |= 3UL << 32; /* IST3 */ /* * The 32-on-64 hypercall entry vector is only accessible from ring 1. @@ -310,7 +311,10 @@ void __init percpu_traps_init(void) stack_bottom = (char *)get_stack_bottom(); stack = (char *)((unsigned long)stack_bottom & ~(STACK_SIZE - 1)); - /* Double-fault handler has its own per-CPU 2kB stack. */ + /* Machine Check handler has its own per-CPU 1kB stack. */ + init_tss[cpu].ist[2] = (unsigned long)&stack[1024]; + + /* Double-fault handler has its own per-CPU 1kB stack. */ init_tss[cpu].ist[0] = (unsigned long)&stack[2048]; /* NMI handler has its own per-CPU 1kB stack. */ |