x86/mce: Do not log spurious corrected mce errors
Subsystems (3)
PATCH 1/1 x86/mce: Do not log spurious corrected mce errors
Alex has reported that he is seeing spurious corrected errors on his hardware.
Intel Errata HSD131, HSM142, HSW131, and BDM48 report that "spurious corrected errors may be logged in the IA32_MC0_STATUS register with the valid field (bit 63) set, the uncorrected error field (bit 61) not set, a Model Specific Error Code (bits [31:16]) of 0x000F, and an MCA Error Code (bits [15:0]) of 0x0005."
Block these spurious errors from the console and logs.
Links to Intel Specification updates:
HSD131: https://www.intel.com/content/www/us/en/products/docs/processors/core/4th-gen-core-family-desktop-specification-update.html
HSM142: https://www.intel.com/content/www/us/en/products/docs/processors/core/4th-gen-core-family-mobile-specification-update.html
HSW131: https://www.intel.com/content/www/us/en/processors/xeon/xeon-e3-1200v3-spec-update.html
BDM48: https://www.intel.com/content/www/us/en/products/docs/processors/core/5th-gen-core-family-spec-update.html
--- arch/x86/kernel/cpu/mce/core.c | 2 ++ arch/x86/kernel/cpu/mce/intel.c | 17 +++++++++++++++++ arch/x86/kernel/cpu/mce/internal.h | 2 ++ 3 files changed, 21 insertions(+)
arch/x86/kernel/cpu/mce/core.c +2 -0
@@ -1877,6 +1877,8 @@ bool filter_mce(struct mce *m) {if (boot_cpu_data.x86_vendor ==X86_VENDOR_AMD )return amd_filter_mce (m); +if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL ) +return intel_filter_mce (m);return false; }
arch/x86/kernel/cpu/mce/intel.c +17 -0
@@ -520,3 +520,20 @@ void mce_intel_feature_clear(struct cpuinfo_x86 *c) {intel_clear_lmce (); } + +bool intel_filter_mce (struct mce *m) +{ +struct cpuinfo_x86 *c = &boot_cpu_data; + +/* MCE errata HSD131, HSM142, HSW131, BDM48, and HSM142 */ +if ((c->x86 ==6 ) && + ((c->x86_model ==INTEL_FAM6_HASWELL ) || + (c->x86_model ==INTEL_FAM6_HASWELL_L ) || + (c->x86_model ==INTEL_FAM6_BROADWELL ) || + (c->x86_model ==INTEL_FAM6_HASWELL_G )) && + (m->bank ==0 ) && + ((m->status &0xa0000000ffffffff ) ==0x80000000000f0005 )) +return true; + +return false; +}
arch/x86/kernel/cpu/mce/internal.h +2 -0
@@ -172,8 +172,10 @@ extern bool filter_mce(struct mce *m);#ifdef CONFIG_X86_MCE_AMD extern bool amd_filter_mce (struct mce *m); +extern bool intel_filter_mce (struct mce *m);#else static inline bool amd_filter_mce (struct mce *m) {return false; }; +static inline bool intel_filter_mce (struct mce *m) {return false; };#endif #endif /* __X86_MCE_INTERNAL_H__ */
Signature · 1 line
2.21.1
Luck, Tony
maintainerQuoted 4 lines · Prarit Bhargava
#ifdef
CONFIG_X86_MCE_AMD
extern boolamd_filter_mce(struct mce *m);
+extern boolintel_filter_mce(struct mce *m);
#else
Something very weird is going on here. Why doesCONFIG_X86_MCE_AMD have to be set to enable some
*Intel* filter operation?
-Tony
Quoted 9 lines · Tony
Quoted 4 lines · Prarit Bhargava
#ifdef
CONFIG_X86_MCE_AMD
extern boolamd_filter_mce(struct mce *m);
+extern boolintel_filter_mce(struct mce *m);
#elseSomething very weird is going on here. Why does
CONFIG_X86_MCE_AMDhave to be set to enable some
*Intel* filter operation?
That's a mistake. I'll fix that in v2.
P.
Quoted 3 lines
-Tony