Re: [PATCH 3/6] x86/mce: Add support for new MCA_SYND register

From: Ingo Molnar
Date: Fri Jul 08 2016 - 05:27:17 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> From: Yazen Ghannam <Yazen.Ghannam@xxxxxxx>
>
> Syndrome information is no longer contained in MCA_STATUS for SMCA
> systems but in a new register.
>
> Add a synd field to struct mce to hold MCA_SYND register value. Add it
> to the end of struct mce to maintain compatibility with old versions of
> mcelog. Also, add it to the respective tracepoint.

> /* AMD-specific bits */
> +#define MCI_STATUS_TCC (1ULL<<55) /* Task context corrupt */
> +#define MCI_STATUS_SYNDV (1ULL<<53) /* synd reg. valid */

> --- a/arch/x86/include/uapi/asm/mce.h
> +++ b/arch/x86/include/uapi/asm/mce.h
> @@ -26,6 +26,7 @@ struct mce {
> __u32 socketid; /* CPU socket ID */
> __u32 apicid; /* CPU initial apic ID */
> __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */
> + __u64 synd; /* MCA_SYND MSR: only valid on SMCA systems */
> };

So why does neither the changelog nor the code comment actually _explain_ this and
give aa bit of a background about what 'syndrome information' is and why we want
to have kernel support for it?

This is why I hate kernel tooling that is not part of the kernel tree - the mcelog
patch (hopefully ...) would tell us more about all this - but it's separate and
this patch does not tell us anything ...

Thanks,

Ingo