Skip to contentSkip to conversation

x86/MCE: Update MCE severity condition check

PATCH In review Chen Gong 4 participants 14 messages Jun 20, 2013 – Jun 27, 2013 1 message not in the archive x86

lore
Share & tools
lore

Chen Gong

author
#0 lore raw

PATCH 1/1 x86/MCE: Update MCE severity condition check

Update some SRAR severity conditions check to make it clearer, according to latest Intel SDM Vol 3(June 2013), table 15-20.

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +5 -10
index beb1f16..1fa12ea 100644
@@ -110,22 +110,17 @@ static struct severity {
 	/* known AR MCACODs: */
 #ifdef	CONFIG_MEMORY_FAILURE
 	MCESEV(
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but non-affected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),
+		MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV)
 		),
 	MCESEV(
-		AR, "Action required: data load error",
+		AR, "Action required: data load error on user land",
 		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
 		USER
 		),
 	MCESEV(
-		KEEP, "HT thread notices Action required: instruction fetch error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
-		MCGMASK(MCG_STATUS_EIPV, 0)
-		),
-	MCESEV(
-		AR, "Action required: instruction fetch error",
+		AR, "Action required: instruction fetch error on user land",
 		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
 		USER
 		),
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw
Quoted 16 lines · Chen Gong

Update some SRAR severity conditions check to make it clearer, according to latest Intel SDM Vol 3(June 2013), table 15-20.

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +0 -0
index beb1f16..1fa12ea 100644
@@ -110,22 +110,17 @@ static struct severity {
 	/* known AR MCACODs: */
 #ifdef	CONFIG_MEMORY_FAILURE
 	MCESEV(

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 118

Quoted 10 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +4 -4
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but non-affected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),
+		MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV)
 		),
 	MCESEV(
-		AR, "Action required: data load error",
+		AR, "Action required: data load error on user land",

You mean "data load error in a user process"?

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 123

Quoted 11 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -6
 		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
 		USER
 		),
 	MCESEV(
-		KEEP, "HT thread notices Action required: instruction fetch error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
-		MCGMASK(MCG_STATUS_EIPV, 0)
-		),
-	MCESEV(
-		AR, "Action required: instruction fetch error",
+		AR, "Action required: instruction fetch error on user land",

ditto?

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
author
#2 lore raw
Quoted 28 lines · Borislav Petkov

Date: Thu, 20 Jun 2013 11:41:52 +0200
From: Borislav Petkov <[email protected]>
To: Chen Gong <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH] x86/MCE: Update MCE severity condition check
User-Agent: Mutt/1.5.21 (2010-09-15)

Quoted 20 lines · Chen Gong

Update some SRAR severity conditions check to make it clearer, according to latest Intel SDM Vol 3(June 2013), table 15-20.

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -3
index beb1f16..1fa12ea 100644
@@ -110,22 +110,17 @@ static struct severity {
 	/* known AR MCACODs: */
 #ifdef	CONFIG_MEMORY_FAILURE
 	MCESEV(
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but non-affected thread is continuable",
Quoted 8 lines

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 118

Quoted 6 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +3 -1
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),
+		MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV)
 		),
 	MCESEV(
-		AR, "Action required: data load error",
+		AR, "Action required: data load error on user land",

You mean "data load error in a user process"?

Yes it is.

Quoted 15 lines

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 123

Quoted 12 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -6
 		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
 		USER
 		),
 	MCESEV(
-		KEEP, "HT thread notices Action required: instruction fetch error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
-		MCGMASK(MCG_STATUS_EIPV, 0)
-		),
-	MCESEV(
-		AR, "Action required: instruction fetch error",
+		AR, "Action required: instruction fetch error on user land",

ditto?

ditto

Quoted 6 lines
Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#3 lore raw
In reply to Chen Gong
Quoted 13 lines · Chen Gong

Update some SRAR severity conditions check to make it clearer, according to latest Intel SDM Vol 3(June 2013), table 15-20.

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +0 -0
index beb1f16..1fa12ea 100644

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 113

Quoted 7 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -3
@@ -110,22 +110,17 @@ static struct severity {
 	/* known AR MCACODs: */
 #ifdef	CONFIG_MEMORY_FAILURE
 	MCESEV(
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but non-affected thread is continuable",

The SDM talks about "non-affected" logical processors, but perhaps we can call this an "unaffected" thread?

- Naveen

#4 lore raw
Quoted 2 lines

The SDM talks about "non-affected" logical processors, but perhaps we can call this an "unaffected" thread?

"unaffected" sounds a bit more natural (but close enough to the wording in the SDM that people should see the connection).

-Tony

#5 lore raw
Quoted 5 lines · Tony
Quoted 2 lines

The SDM talks about "non-affected" logical processors, but perhaps we can call this an "unaffected" thread?

"unaffected" sounds a bit more natural (but close enough to the wording in the SDM that people should see the connection).

Yup - "unnatural" is precisely the term that describes my feeling when I read the original description :)

Thanks,
Naveen

author
#6 lore raw
In reply to Luck, Tony
Quoted 8 lines · Tony

Date: Tue, 25 Jun 2013 16:31:23 +0000
From: "Luck, Tony" <[email protected]>
To: "Naveen N. Rao" <[email protected]>, Chen Gong
<[email protected]>
CC: "[email protected]" <[email protected]>, "[email protected]"
<[email protected]>
Subject: RE: [PATCH] x86/MCE: Update MCE severity condition check

Quoted 7 lines
Quoted 2 lines

The SDM talks about "non-affected" logical processors, but perhaps we can call this an "unaffected" thread?

"unaffected" sounds a bit more natural (but close enough to the wording in the SDM that people should see the connection).

-Tony

If this patch is OK, would you please help to update it when merging it? Thanks very much.

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#8 lore raw

Re: [PATCH] x86/mce: Update MCE severity condition check

Quoted 29 lines · Tony

From: Chen Gong <[email protected]>

Update some SRAR severity conditions check to make it clearer according to latest Intel SDM Vol 3B (June 2013), table 15-20.

---

Quoted 2 lines · Chen Gong

If this patch is OK, would you please help to update it when merging it? Thanks very much

This is what I plan to apply.
1. Changed "user land" to "in a user process" (2 places) per Boris comment
2. Changed "non-affected" to "unaffected" per Naveen comment

Anyone wants to jump on the "Acked-by" bandwagon - speak now.

(quoted diff) +0 -1
-Tony
 
 arch/x86/kernel/cpu/mcheck/mce-severity.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +0 -0
index beb1f16..e2703520 100644

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 114

Quoted 8 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +2 -3
@@ -110,22 +110,17 @@ static struct severity {
 	/* known AR MCACODs: */
 #ifdef	CONFIG_MEMORY_FAILURE
 	MCESEV(
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but unaffected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),

Why did we lose MCACOD_DATA from the MASK above? Was this intentional?

arch/x86/kernel/cpu/mcheck/mce-severity.c static struct severity { · line 115

Quoted 1 line
arch/x86/kernel/cpu/mcheck/mce-severity.c +1 -0
+		MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV)

This change I can understand as restart IP is valid for thread is continuable.

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#9 lore raw

RE: [PATCH] x86/mce: Update MCE severity condition check

	MCESEV(
Quoted 7 lines
arch/x86/kernel/cpu/mcheck/mce-severity.c +2 -3
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but unaffected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),

Why did we lose MCACOD_DATA from the MASK above? Was this intentional?

We used to have separate entries for "HT thread notices ... data load" and "HT thread notices ... instruction load" because the old SDM had a complex table calling out the bit settings for each type of recoverable machine check.

Latest SDM simplifies the table making it clear that for every SRAR (software recoverable action required) error we'll have the same bits in MCG_STATUS (EIPV=0, RIPV=1) ... so we don't need to check for the MCACOD value. See attached snapshot of the new table.

-Tony

maintainer
#10 lore raw

Re: [PATCH] x86/mce: Update MCE severity condition check

Quoted 10 lines · Tony
	MCESEV(
Quoted 7 lines
(quoted diff) +2 -3
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but unaffected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),

Why did we lose MCACOD_DATA from the MASK above? Was this intentional?

Quoted 6 lines

We used to have separate entries for "HT thread notices ... data load" and "HT thread notices ... instruction load" because the old SDM had a complex table calling out the bit settings for each type of recoverable machine check.

Latest SDM simplifies the table making it clear that for every SRAR (software recoverable action required) error we'll have the same bits in MCG_STATUS (EIPV=0, RIPV=1) ... so we don't need to check for the MCACOD value. See attached snapshot of the new table.

And this obviously is the case for the hardware too, I assume, not only the SDM?

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
#11 lore raw

RE: [PATCH] x86/mce: Update MCE severity condition check

Quoted 2 lines

And this obviously is the case for the hardware too, I assume, not only the SDM?

Yes - we have a magic process which reconfigures all deployed silicon whenever a new SDM is published :-)

Actually the SDM had been collecting new features for each generation ... each time just bolting on a new paragraph or table. I snapped when I saw the table that was proposed for 15-20 to add "continuable" errors and complained that it had gotten way too complicated ... and proposed the version that you see in the current SDM.

It accurately portrays what older generations implemented, and adds the new continuable (EIPV=1, RIPV=1) while removing many rows and columns.

-Tony ���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

maintainer
#12 lore raw

Re: [PATCH] x86/mce: Update MCE severity condition check

Quoted 5 lines · Tony
Quoted 2 lines

And this obviously is the case for the hardware too, I assume, not only the SDM?

Yes - we have a magic process which reconfigures all deployed silicon whenever a new SDM is published :-)

Haha, I wouldn't wonder if your silicon dudes come up with reprogrammable fuses someday :-)

Quoted 8 lines

Actually the SDM had been collecting new features for each generation ... each time just bolting on a new paragraph or table. I snapped when I saw the table that was proposed for 15-20 to add "continuable" errors and complained that it had gotten way too complicated ... and proposed the version that you see in the current SDM.

It accurately portrays what older generations implemented, and adds the new continuable (EIPV=1, RIPV=1) while removing many rows and columns.

Cool :)

Signature · 5 lines
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
author
#13 lore raw

Re: [PATCH] x86/mce: Update MCE severity condition check

Quoted 10 lines · Borislav Petkov

Date: Wed, 26 Jun 2013 23:10:52 +0200
From: Borislav Petkov <[email protected]>
To: "Luck, Tony" <[email protected]>
Cc: "[email protected]" <[email protected]>, Chen
Gong <[email protected]>, "Naveen N. Rao" <[email protected]>
Subject: Re: [PATCH] x86/mce: Update MCE severity condition check
User-Agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 26, 2013 at 09:00:10PM +0000, Luck, Tony wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

And this obviously is the case for the hardware too, I assume, not only the SDM?

Yes - we have a magic process which reconfigures all deployed silicon whenever a new SDM is published :-)

Haha, I wouldn't wonder if your silicon dudes come up with reprogrammable fuses someday :-)

If so, it must be a catastrophe and the guys who wrote SDM have a big trouble ... ;-)

Acked-by
#14 lore raw

Re: [PATCH] x86/mce: Update MCE severity condition check

In reply to a message not in the archive
Quoted 10 lines · Tony

From: Chen Gong <[email protected]>

Update some SRAR severity conditions check to make it clearer according to latest Intel SDM Vol 3B (June 2013), table 15-20.

---

Chen Gong wrote:

Quoted 8 lines
Quoted 2 lines

If this patch is OK, would you please help to update it when merging it? Thanks very much

This is what I plan to apply.
1. Changed "user land" to "in a user process" (2 places) per Boris comment
2. Changed "non-affected" to "unaffected" per Naveen comment

Anyone wants to jump on the "Acked-by" bandwagon - speak now.

Yep - looks fine to me.

Thanks,
Naveen

Quoted 39 lines
(quoted diff) +0 -1
-Tony
 
  arch/x86/kernel/cpu/mcheck/mce-severity.c | 15 +++++----------
  1 file changed, 5 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +5 -10
index beb1f16..e2703520 100644
@@ -110,22 +110,17 @@ static struct severity {
  	/* known AR MCACODs: */
  #ifdef	CONFIG_MEMORY_FAILURE
  	MCESEV(
-		KEEP, "HT thread notices Action required: data load error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
-		MCGMASK(MCG_STATUS_EIPV, 0)
+		KEEP, "Action required but unaffected thread is continuable",
+		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR),
+		MCGMASK(MCG_STATUS_RIPV, MCG_STATUS_RIPV)
  		),
  	MCESEV(
-		AR, "Action required: data load error",
+		AR, "Action required: data load error in a user process",
  		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA),
  		USER
  		),
  	MCESEV(
-		KEEP, "HT thread notices Action required: instruction fetch error",
-		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
-		MCGMASK(MCG_STATUS_EIPV, 0)
-		),
-	MCESEV(
-		AR, "Action required: instruction fetch error",
+		AR, "Action required: instruction fetch error in a user process",
  		SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR),
  		USER
  		),