[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: Make MCE panic message more obvious
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1228915810 0 # Node ID 415a69b41397923ec27c5b8a821e72b5eb0d4e53 # Parent 265baac90802c1fd45f4d731d5e65b1b95214df4 x86: Make MCE panic message more obvious 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 <Tim.Deegan@xxxxxxxxxx> --- xen/arch/x86/cpu/mcheck/amd_k8.c | 4 ++-- xen/arch/x86/cpu/mcheck/k7.c | 4 ++-- xen/arch/x86/cpu/mcheck/mce.c | 13 +++++++++++++ xen/arch/x86/cpu/mcheck/mce.h | 1 + xen/arch/x86/cpu/mcheck/p4.c | 4 ++-- xen/arch/x86/cpu/mcheck/p6.c | 4 ++-- 6 files changed, 22 insertions(+), 8 deletions(-) diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/amd_k8.c --- a/xen/arch/x86/cpu/mcheck/amd_k8.c Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/amd_k8.c Wed Dec 10 13:30:10 2008 +0000 @@ -219,7 +219,7 @@ void k8_machine_check(struct cpu_user_re show_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 { diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/k7.c --- a/xen/arch/x86/cpu/mcheck/k7.c Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/k7.c Wed Dec 10 13:30:10 2008 +0000 @@ -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); diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/mce.c --- a/xen/arch/x86/cpu/mcheck/mce.c Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/mce.c Wed Dec 10 13:30:10 2008 +0000 @@ -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) u return 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"); +} diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/mce.h --- a/xen/arch/x86/cpu/mcheck/mce.h Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/mce.h Wed Dec 10 13:30:10 2008 +0000 @@ -24,6 +24,7 @@ void x86_mcinfo_clear(struct mc_info *mi void 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; diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/p4.c --- a/xen/arch/x86/cpu/mcheck/p4.c Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/p4.c Wed Dec 10 13:30:10 2008 +0000 @@ -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"); /* diff -r 265baac90802 -r 415a69b41397 xen/arch/x86/cpu/mcheck/p6.c --- a/xen/arch/x86/cpu/mcheck/p6.c Wed Dec 10 13:28:58 2008 +0000 +++ b/xen/arch/x86/cpu/mcheck/p6.c Wed Dec 10 13:30:10 2008 +0000 @@ -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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |