Skip to contentSkip to conversation

x86/mce: Don't check for "OVER" bit on action optional machine checks

PATCH New Tony Luck 2 participants 2 messages Jul 18, 2019 – Aug 5, 2019

Subsystems (3)
lore
Share & tools
lore

Tony Luck

author maintainer
#0 lore raw

PATCH 1/1 x86/mce: Don't check for "OVER" bit on action optional machine checks

We currently do not process SRAO (Software Recoverable Action Optional) machine checks if they are logged with the overflow bit set to 1 in the machine check bank status register. This is overly conservative.

There are two cases where we could end up with an SRAO+OVER log based on the SDM volume 3 overwrite rules in "Table 15-8. Overwrite Rules for UC, CE, and UCR Errors"

1) First a corrected error is logged, then the SRAO error overwrites. The second error overwrites the first because uncorrected errors have a higher severity than corrected errors.
2) The SRAO error was logged first, followed by a correcetd error. In this case the first error is retained in the bank.

So in either case the machine check bank will contain the address of the SRAO error. So we can process that even if the overflow bit was set.

---
 arch/x86/kernel/cpu/mce/severity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mce/severity.c +2 -2
index 210f1f5db5f7..87bcdc6dc2f0 100644
@@ -107,11 +107,11 @@ static struct severity {
 	 */
 	MCESEV(
 		AO, "Action optional: memory scrubbing error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_AR|MCACOD_SCRUBMSK, MCI_STATUS_UC|MCACOD_SCRUB)
+		SER, MASK(MCI_UC_AR|MCACOD_SCRUBMSK, MCI_STATUS_UC|MCACOD_SCRUB)
 		),
 	MCESEV(
 		AO, "Action optional: last level cache writeback error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_AR|MCACOD, MCI_STATUS_UC|MCACOD_L3WB)
+		SER, MASK(MCI_UC_AR|MCACOD, MCI_STATUS_UC|MCACOD_L3WB)
 		),
 
 	/* ignore OVER for UCNA */
Signature · 1 line
2.20.1
#1 lore raw

[tip:ras/core] x86/mce: Don't check for the overflow bit on action optional machine checks

x86/mce: Don't check for the overflow bit on action optional machine checks
Commit-ID:  aaefca8e30d9df7a4ca13c9c8e135dd227b8ff19
Gitweb:     https://git.kernel.org/tip/aaefca8e30d9df7a4ca13c9c8e135dd227b8ff19
Author:     Tony Luck <[email protected]>
AuthorDate: Thu, 18 Jul 2019 11:29:20 -0700
Committer:  Borislav Petkov <[email protected]>
CommitDate: Mon, 5 Aug 2019 09:34:02 +0200

x86/mce: Don't check for the overflow bit on action optional machine checks

We currently do not process SRAO (Software Recoverable Action Optional) machine checks if they are logged with the overflow bit set to 1 in the machine check bank status register. This is overly conservative.

There are two cases where we could end up with an SRAO+OVER log based on the SDM volume 3 overwrite rules in "Table 15-8. Overwrite Rules for UC, CE, and UCR Errors"

1) First a corrected error is logged, then the SRAO error overwrites. The second error overwrites the first because uncorrected errors have a higher severity than corrected errors.
2) The SRAO error was logged first, followed by a correcetd error. In this case the first error is retained in the bank.

So in either case the machine check bank will contain the address of the SRAO error. So we can process that even if the overflow bit was set.

---
 arch/x86/kernel/cpu/mce/severity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/mce/severity.c +2 -2
index 210f1f5db5f7..87bcdc6dc2f0 100644
@@ -107,11 +107,11 @@ static struct severity {
 	 */
 	MCESEV(
 		AO, "Action optional: memory scrubbing error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_AR|MCACOD_SCRUBMSK, MCI_STATUS_UC|MCACOD_SCRUB)
+		SER, MASK(MCI_UC_AR|MCACOD_SCRUBMSK, MCI_STATUS_UC|MCACOD_SCRUB)
 		),
 	MCESEV(
 		AO, "Action optional: last level cache writeback error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_AR|MCACOD, MCI_STATUS_UC|MCACOD_L3WB)
+		SER, MASK(MCI_UC_AR|MCACOD, MCI_STATUS_UC|MCACOD_L3WB)
 		),
 
 	/* ignore OVER for UCNA */