RE: [PATCH v2 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers
From: Ghannam, Yazen
Date: Tue Apr 11 2017 - 09:19:00 EST
> -----Original Message-----
> From: Borislav Petkov [mailto:bp@xxxxxxxxx]
> Sent: Tuesday, April 11, 2017 9:12 AM
> To: Ghannam, Yazen <Yazen.Ghannam@xxxxxxx>
> Cc: linux-edac@xxxxxxxxxxxxxxx; Tony Luck <tony.luck@xxxxxxxxx>;
> x86@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 1/2] x86/mce/AMD: Redo use of SMCA
> MCA_DE{STAT,ADDR} registers
>
> On Tue, Apr 11, 2017 at 12:53:56PM +0000, Ghannam, Yazen wrote:
> > If we do as above then we can possibly log the same deferred error twice.
>
> Why twice?
>
> for_each_bank()
> log_error()
> |-> clear MSRs after logging
>
So log_error() reads/clears MCA_STATUS, right? This won't affect MCA_DESTAT
on SMCA systems. So if we call log_error_smca() and unconditionally read
MCA_DESTAT, we will find the same deferred error that we logged in log_error().
Thanks,
Yazen