mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH tip: x86/bugs v2] x86/mce: make sure cmci banks are cleared during shutdown on intel
@ 2025-06-27 17:49 JP Kobryn
  2025-06-28 11:33 ` [tip: ras/urgent] x86/mce: Make sure CMCI banks are cleared during shutdown on Intel tip-bot2 for JP Kobryn
  0 siblings, 1 reply; 2+ messages in thread
From: JP Kobryn @ 2025-06-27 17:49 UTC (permalink / raw)
  To: tony.luck, bp, tglx, mingo, dave.hansen, hpa, aijay
  Cc: linux-edac, linux-kernel, kernel-team

CMCI banks are not cleared during shutdown on intel CPU's. As a side effect
when a kexec is performed, CPU's coming back online are unable to
rediscover/claim these occupied banks which breaks MCE reporting.

Clear the CPU ownership during shutdown via cmci_clear() so the banks can
be reclaimed and MCE reporting will become functional once more.

Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Reported-by: Aijay Adams <aijay@meta.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
---
 arch/x86/kernel/cpu/mce/intel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
index efcf21e9552e..9b149b9c4109 100644
--- a/arch/x86/kernel/cpu/mce/intel.c
+++ b/arch/x86/kernel/cpu/mce/intel.c
@@ -478,6 +478,7 @@ void mce_intel_feature_init(struct cpuinfo_x86 *c)
 void mce_intel_feature_clear(struct cpuinfo_x86 *c)
 {
 	intel_clear_lmce();
+	cmci_clear();
 }
 
 bool intel_filter_mce(struct mce *m)
-- 
2.47.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-28 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-27 17:49 [PATCH tip: x86/bugs v2] x86/mce: make sure cmci banks are cleared during shutdown on intel JP Kobryn
2025-06-28 11:33 ` [tip: ras/urgent] x86/mce: Make sure CMCI banks are cleared during shutdown on Intel tip-bot2 for JP Kobryn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®