Make MCE panic message more direct
PATCH 1/1 Make MCE panic message more direct
Make it more obvious to the untrained user that machine check reboots are hardware faults, rather then just saying "CPU context corrupt".
Signed-off-by Tim Deegan <[email protected]>
xen/arch/x86/cpu/mcheck/amd_k8.c +2 -2
@@ -219,7 +219,7 @@ void k8_machine_check(struct cpu_user_reshow_execution_state (regs); }x86_mcinfo_dump (mc_data); -panic ("End of MCE. Use mcelog to decode above error codes.\n" ); +mc_panic ("End of MCE. Use mcelog to decode above error codes.\n" ); }/* If Dom0 registered a machine check handler, which is only possible
@@ -248,7 +248,7 @@ void k8_machine_check(struct cpu_user_re/* Dom0 is impacted. Since noone can't handle * this error, panic! */ x86_mcinfo_dump (mc_data); -panic ("MCE occured in Dom0, which it can't handle\n" ); +mc_panic ("MCE occured in Dom0, which it can't handle\n" );/* UNREACHED */ }else {
xen/arch/x86/cpu/mcheck/k7.c +2 -2
@@ -57,9 +57,9 @@ static fastcall void k7_machine_check(st }if (recover&2 ) -panic ("CPU context corrupt" ); +mc_panic ("CPU context corrupt" );if (recover&1 ) -panic ("Unable to continue" ); +mc_panic ("Unable to continue" );printk (KERN_EMERG "Attempting to continue.\n" ); mcgstl &= ~(1 <<2 );wrmsr (MSR_IA32_MCG_STATUS ,mcgstl, mcgsth);
xen/arch/x86/cpu/mcheck/mce.c +13 -0
@@ -9,6 +9,7 @@#include <xen/config.h> #include <xen/smp.h> #include <xen/errno.h> +#include <xen/console.h> #include <asm/processor.h> #include <asm/system.h>
@@ -574,3 +575,15 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) ureturn ret; } + +void mc_panic (char *s) +{ +console_start_sync (); +printk ("Fatal machine check: %s\n" , s); +printk ("\n" +"****************************************\n" +"\n" +" The processor has reported a hardware error which cannot\n" +" be recovered from. Xen will now reboot the machine.\n" ); +panic ("HARDWARE ERROR" ); +}
xen/arch/x86/cpu/mcheck/mce.h +1 -0
@@ -24,6 +24,7 @@ void x86_mcinfo_clear(struct mc_info *mivoid x86_mcinfo_clear (struct mc_info *mi);int x86_mcinfo_add (struct mc_info *mi,void *mcinfo);void x86_mcinfo_dump (struct mc_info *mi); +void mc_panic (char *s);/* Global variables */ extern int mce_disabled;
xen/arch/x86/cpu/mcheck/p4.c +2 -2
@@ -204,9 +204,9 @@ static fastcall void intel_machine_check }if (recover &2 ) -panic ("CPU context corrupt" ); +mc_panic ("CPU context corrupt" );if (recover &1 ) -panic ("Unable to continue" ); +mc_panic ("Unable to continue" );printk (KERN_EMERG "Attempting to continue.\n" );/*
xen/arch/x86/cpu/mcheck/p6.c +2 -2
@@ -51,9 +51,9 @@ static fastcall void intel_machine_check }if (recover &2 ) -panic ("CPU context corrupt" ); +mc_panic ("CPU context corrupt" );if (recover &1 ) -panic ("Unable to continue" ); +mc_panic ("Unable to continue" );printk (KERN_EMERG "Attempting to continue.\n" );/*
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel