[PATCH v2 5/6] x86/mce: Do not take action on SRAO/Deferred errors on AMD for now

From: Jan H. SchÃnherr
Date: Fri Jan 03 2020 - 10:08:12 EST

Per Yazen Ghannam we should not use the UC notifier for the time
being on AMD.

Reported-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Signed-off-by: Jan H. SchÃnherr <jschoenh@xxxxxxxxx>
New in v2. This is due to a remark from Yazen on v1, that we shouldn't
be handling neither SRAO nor Deferred errors in that handler.

An alternative implementation would do the architecture "if" directly
within uc_decode_notifier(), in which case we could decide to not apply
patch 4.
arch/x86/kernel/cpu/mce/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index d48deb127071..d8fe5b048ee7 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1970,7 +1970,8 @@ int __init mcheck_init(void)
- mce_register_decode_chain_internal(&mce_uc_nb);
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+ mce_register_decode_chain_internal(&mce_uc_nb);