[PATCH] x86/mce: Debug spurious MCA errors

From: Yazen Ghannam
Date: Tue Sep 16 2025 - 09:44:24 EST


Suspect that unexpected error information is present in MCA_DESTAT
register.

Print some info for debug.

Check for the "Deferred" status bit to decide if the deferred error
registers should be logged. Only deferred errors should be logged in
these registers, so anything else should be ignored.

Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
arch/x86/kernel/cpu/mce/core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 6e48290a3844..741473ef7fdc 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -741,6 +741,11 @@ static bool smca_should_log_poll_error(enum mcp_flags flags, struct mce_hw_err *
if (!(m->status & MCI_STATUS_VAL))
return false;

+ pr_err("DEBUG: CPU%d Bank:%d Status:0x%016llx\n", m->extcpu, m->bank, m->status);
+
+ if (!(m->status & MCI_STATUS_DEFERRED))
+ return false;
+
m->kflags |= MCE_CHECK_DFR_REGS;
return true;
}
--
2.51.0