aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2016-02-17 13:20:13 -0500
committerIngo Molnar <mingo@kernel.org>2016-02-18 03:28:47 -0500
commit0f68c088c0adb3c3bbeb487c4ebcde91fd5d34be (patch)
tree4aa087d9a71e7f27655d43d0a46555efd856ecf6 /arch/x86/kernel
parent3a2f2ac9b96f9a9f5538396a212d3b9fb543bfc5 (diff)
x86/cpufeature: Create a new synthetic cpu capability for machine check recovery
The Intel Software Developer Manual describes bit 24 in the MCG_CAP MSR: MCG_SER_P (software error recovery support present) flag, bit 24 — Indicates (when set) that the processor supports software error recovery But only some models with this capability bit set will actually generate recoverable machine checks. Check the model name and set a synthetic capability bit. Provide a command line option to set this bit anyway in case the kernel doesn't recognise the model name. Signed-off-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/2e5bfb23c89800a036fb8a45fa97a74bb16bc362.1455732970.git.tony.luck@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index a006f4cd792b..b5b187c8cc07 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1576,6 +1576,17 @@ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
1576 1576
1577 if (c->x86 == 6 && c->x86_model == 45) 1577 if (c->x86 == 6 && c->x86_model == 45)
1578 quirk_no_way_out = quirk_sandybridge_ifu; 1578 quirk_no_way_out = quirk_sandybridge_ifu;
1579 /*
1580 * MCG_CAP.MCG_SER_P is necessary but not sufficient to know
1581 * whether this processor will actually generate recoverable
1582 * machine checks. Check to see if this is an E7 model Xeon.
1583 * We can't do a model number check because E5 and E7 use the
1584 * same model number. E5 doesn't support recovery, E7 does.
1585 */
1586 if (mca_cfg.recovery || (mca_cfg.ser &&
1587 !strncmp(c->x86_model_id,
1588 "Intel(R) Xeon(R) CPU E7-", 24)))
1589 set_cpu_cap(c, X86_FEATURE_MCE_RECOVERY);
1579 } 1590 }
1580 if (cfg->monarch_timeout < 0) 1591 if (cfg->monarch_timeout < 0)
1581 cfg->monarch_timeout = 0; 1592 cfg->monarch_timeout = 0;
@@ -2028,6 +2039,8 @@ static int __init mcheck_enable(char *str)
2028 cfg->bootlog = (str[0] == 'b'); 2039 cfg->bootlog = (str[0] == 'b');
2029 else if (!strcmp(str, "bios_cmci_threshold")) 2040 else if (!strcmp(str, "bios_cmci_threshold"))
2030 cfg->bios_cmci_threshold = true; 2041 cfg->bios_cmci_threshold = true;
2042 else if (!strcmp(str, "recovery"))
2043 cfg->recovery = true;
2031 else if (isdigit(str[0])) { 2044 else if (isdigit(str[0])) {
2032 if (get_option(&str, &cfg->tolerant) == 2) 2045 if (get_option(&str, &cfg->tolerant) == 2)
2033 get_option(&str, &(cfg->monarch_timeout)); 2046 get_option(&str, &(cfg->monarch_timeout));