# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Node ID e3abede54214b35d06e988b321432bd1f4597c79
# Parent cf8e65797826dc86cab5ebfd735dd9823853e5c0
[XEN] Do not halt on exceptions-with-interrupts-disabled and double faults.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
xen/arch/x86/traps.c | 35 +++++++++++------------------------
xen/arch/x86/x86_32/traps.c | 12 ++----------
xen/arch/x86/x86_64/traps.c | 12 ++----------
3 files changed, 15 insertions(+), 44 deletions(-)
diff -r cf8e65797826 -r e3abede54214 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c Sat Nov 04 19:50:59 2006 +0000
+++ b/xen/arch/x86/traps.c Sat Nov 04 20:13:22 2006 +0000
@@ -338,7 +338,6 @@ void show_execution_state(struct cpu_use
*/
asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs)
{
- int cpu = smp_processor_id();
static char *trapstr[] = {
"divide error", "debug", "nmi", "bkpt", "overflow", "bounds",
"invalid opcode", "device not available", "double fault",
@@ -360,20 +359,10 @@ asmlinkage void fatal_trap(int trapnr, s
show_page_walk(cr2);
}
- printk("************************************\n");
- printk("CPU%d FATAL TRAP %d (%s), ERROR_CODE %04x%s.\n",
- cpu, trapnr, trapstr[trapnr], regs->error_code,
- (regs->eflags & X86_EFLAGS_IF) ? "" : ", IN INTERRUPT CONTEXT");
- printk("System shutting down -- need manual reset.\n");
- printk("************************************\n");
-
- (void)debugger_trap_fatal(trapnr, regs);
-
- /* Lock up the console to prevent spurious output from other CPUs. */
- console_force_lock();
-
- /* Wait for manual reset. */
- machine_halt();
+ panic("FATAL TRAP: vector = %d (%s)\n"
+ "[error_code=%04x] %s\n",
+ trapnr, trapstr[trapnr], regs->error_code,
+ (regs->eflags & X86_EFLAGS_IF) ? "" : ", IN INTERRUPT CONTEXT");
}
static inline int do_trap(int trapnr, char *str,
@@ -416,9 +405,9 @@ static inline int do_trap(int trapnr, ch
DEBUGGER_trap_fatal(trapnr, regs);
show_execution_state(regs);
- panic("CPU%d FATAL TRAP: vector = %d (%s)\n"
+ panic("FATAL TRAP: vector = %d (%s)\n"
"[error_code=%04x]\n",
- smp_processor_id(), trapnr, str, regs->error_code);
+ trapnr, str, regs->error_code);
return 0;
}
@@ -630,8 +619,7 @@ asmlinkage int do_invalid_op(struct cpu_
}
DEBUGGER_trap_fatal(TRAP_invalid_op, regs);
show_execution_state(regs);
- panic("CPU%d FATAL TRAP: vector = %d (invalid opcode)\n",
- smp_processor_id(), TRAP_invalid_op);
+ panic("FATAL TRAP: vector = %d (invalid opcode)\n", TRAP_invalid_op);
}
if ( (rc = emulate_forced_invalid_op(regs)) != 0 )
@@ -659,7 +647,7 @@ asmlinkage int do_int3(struct cpu_user_r
{
DEBUGGER_trap_fatal(TRAP_int3, regs);
show_execution_state(regs);
- panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id());
+ panic("FATAL TRAP: vector = 3 (Int3)\n");
}
ti = ¤t->arch.guest_context.trap_ctxt[TRAP_int3];
@@ -930,10 +918,10 @@ asmlinkage int do_page_fault(struct cpu_
show_execution_state(regs);
show_page_walk(addr);
- panic("CPU%d FATAL PAGE FAULT\n"
+ panic("FATAL PAGE FAULT\n"
"[error_code=%04x]\n"
"Faulting linear address: %p\n",
- smp_processor_id(), regs->error_code, _p(addr));
+ regs->error_code, _p(addr));
}
propagate_page_fault(addr, regs->error_code);
@@ -1517,8 +1505,7 @@ asmlinkage int do_general_protection(str
hardware_gp:
show_execution_state(regs);
- panic("CPU%d GENERAL PROTECTION FAULT\n[error_code=%04x]\n",
- smp_processor_id(), regs->error_code);
+ panic("GENERAL PROTECTION FAULT\n[error_code=%04x]\n", regs->error_code);
return 0;
}
diff -r cf8e65797826 -r e3abede54214 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c Sat Nov 04 19:50:59 2006 +0000
+++ b/xen/arch/x86/x86_32/traps.c Sat Nov 04 20:13:22 2006 +0000
@@ -168,16 +168,8 @@ asmlinkage void do_double_fault(void)
printk("ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n",
tss->ds, tss->es, tss->fs, tss->gs, tss->ss);
show_stack_overflow(tss->esp);
- printk("************************************\n");
- printk("CPU%d DOUBLE FAULT -- system shutdown\n", cpu);
- printk("System needs manual reset.\n");
- printk("************************************\n");
-
- /* Lock up the console to prevent spurious output from other CPUs. */
- console_force_lock();
-
- /* Wait for manual reset. */
- machine_halt();
+
+ panic("DOUBLE FAULT -- system shutdown\n");
}
unsigned long do_iret(void)
diff -r cf8e65797826 -r e3abede54214 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c Sat Nov 04 19:50:59 2006 +0000
+++ b/xen/arch/x86/x86_64/traps.c Sat Nov 04 20:13:22 2006 +0000
@@ -172,16 +172,8 @@ asmlinkage void do_double_fault(struct c
regs->r12, regs->r13, regs->r14);
printk("r15: %016lx\n", regs->r15);
show_stack_overflow(regs->rsp);
- printk("************************************\n");
- printk("CPU%d DOUBLE FAULT -- system shutdown\n", cpu);
- printk("System needs manual reset.\n");
- printk("************************************\n");
-
- /* Lock up the console to prevent spurious output from other CPUs. */
- console_force_lock();
-
- /* Wait for manual reset. */
- machine_halt();
+
+ panic("DOUBLE FAULT -- system shutdown\n");
}
void toggle_guest_mode(struct vcpu *v)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|