From: Liu Jinsong Date: Tue, 6 Dec 2011 21:26:16 +0000 (+0800) Subject: xen/mce: Change the machine check point X-Git-Tag: v2.6.39-400.9.0~595^2~5^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b821d4bf0d69b71ffef5755e3396d78b19932bcb;p=users%2Fjedix%2Flinux-maple.git xen/mce: Change the machine check point This patch backport from Jeremy's pvops commit 073349667402682c997394b3fcdbbeb6707f368f Enable MCE support in dom0, so that if a MCE happen and that MCE impact dom0, dom0 can receive a vMCE. Signed-off-by: Liu, Jinsong Signed-off-by: Ke, Liping Signed-off-by: Jiang, Yunhong Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index c28824566aa6..cfd1b8093163 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -521,7 +521,7 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val, * Look for known traps using IST, and substitute them * appropriately. The debugger ones are the only ones we care * about. Xen will handle faults like double_fault and - * machine_check, so we should never see them. Warn if + * nmi, so we should never see them. Warn if * there's an unexpected IST-using fault handler. */ if (addr == (unsigned long)debug) @@ -536,7 +536,10 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val, return 0; #ifdef CONFIG_X86_MCE } else if (addr == (unsigned long)machine_check) { - return 0; + if (xen_initial_domain()) + addr = (unsigned long)machine_check; + else + return 0; #endif } else { /* Some other trap using IST? */