All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, mce, amd: Read mcgstatus before we log the error
@ 2015-05-13 17:37 Aravind Gopalakrishnan
  2015-05-14  9:50 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Aravind Gopalakrishnan @ 2015-05-13 17:37 UTC (permalink / raw)
  To: tony.luck, bp, tglx, mingo, hpa
  Cc: x86, linux-edac, linux-kernel, Aravind Gopalakrishnan

Code to read mcgstatus was introduced with patch 44612a3ac.
However, that seems to have been accidentally removed in a3a529d10.
Adding that back here.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
 arch/x86/kernel/cpu/mcheck/mce_amd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index e99b150..7edfa4c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -319,6 +319,7 @@ static void __log_error(unsigned int bank, bool threshold_err, u64 misc)
 		return;
 
 	mce_setup(&m);
+	rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
 
 	m.status = status;
 	m.bank = bank;
-- 
2.4.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, mce, amd: Read mcgstatus before we log the error
  2015-05-13 17:37 [PATCH] x86, mce, amd: Read mcgstatus before we log the error Aravind Gopalakrishnan
@ 2015-05-14  9:50 ` Borislav Petkov
  2015-05-14 14:56   ` Aravind Gopalakrishnan
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2015-05-14  9:50 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tony.luck, tglx, mingo, hpa, x86, linux-edac, linux-kernel

On Wed, May 13, 2015 at 12:37:04PM -0500, Aravind Gopalakrishnan wrote:
> Code to read mcgstatus was introduced with patch 44612a3ac.
> However, that seems to have been accidentally removed in a3a529d10.
> Adding that back here.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> ---
>  arch/x86/kernel/cpu/mcheck/mce_amd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> index e99b150..7edfa4c 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> @@ -319,6 +319,7 @@ static void __log_error(unsigned int bank, bool threshold_err, u64 misc)
>  		return;
>  
>  	mce_setup(&m);
> +	rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);

Any meaningful bits in that MSR we wanna know when getting a
thresholding or deferred error? Are they even defined?

If yes, RIPV should always be 1b, EIPV too, MCIP can't be set.

-ENOMOREUSEFULBITS.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, mce, amd: Read mcgstatus before we log the error
  2015-05-14  9:50 ` Borislav Petkov
@ 2015-05-14 14:56   ` Aravind Gopalakrishnan
  0 siblings, 0 replies; 3+ messages in thread
From: Aravind Gopalakrishnan @ 2015-05-14 14:56 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: tony.luck, tglx, mingo, hpa, x86, linux-edac, linux-kernel

On 5/14/2015 4:50 AM, Borislav Petkov wrote:
> On Wed, May 13, 2015 at 12:37:04PM -0500, Aravind Gopalakrishnan wrote:
>>   
>>   	mce_setup(&m);
>> +	rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);
> Any meaningful bits in that MSR we wanna know when getting a
> thresholding or deferred error? Are they even defined?

Ah. Good point. RIPV is not defined for Deferred errors.
For thresholding, we'll hit the interrupt handler only if we hit the 
threshold and
it is not UC error (for which RIPV is not defined). Else, the counter 
would be incremented,
but it would cause a #MC anyway.

> If yes, RIPV should always be 1b, EIPV too, MCIP can't be set.
>
> -ENOMOREUSEFULBITS.
>

Thanks,
-Aravind.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-14 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 17:37 [PATCH] x86, mce, amd: Read mcgstatus before we log the error Aravind Gopalakrishnan
2015-05-14  9:50 ` Borislav Petkov
2015-05-14 14:56   ` Aravind Gopalakrishnan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.