x86/mce: Check whether writes to MCA_STATUS are getting ignored
authorSmita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Mon, 27 Jun 2022 20:56:46 +0000 (20:56 +0000)
committerBorislav Petkov <bp@suse.de>
Tue, 28 Jun 2022 10:08:10 +0000 (12:08 +0200)
commit891e465a1bd8798d5f97c3afb99393f123817fef
treebfe8772f4523294b9569a93480168b714d1412b8
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e
x86/mce: Check whether writes to MCA_STATUS are getting ignored

The platform can sometimes - depending on its settings - cause writes
to MCA_STATUS MSRs to get ignored, regardless of HWCR[McStatusWrEn]'s
value.

For further info see

  PPR for AMD Family 19h, Model 01h, Revision B1 Processors, doc ID 55898

at https://bugzilla.kernel.org/show_bug.cgi?id=206537.

Therefore, probe for ignored writes to MCA_STATUS to determine if hardware
error injection is at all possible.

  [ bp: Heavily massage commit message and patch. ]

Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220214233640.70510-2-Smita.KoralahalliChannabasappa@amd.com
arch/x86/kernel/cpu/mce/inject.c
arch/x86/kernel/cpu/mce/internal.h