From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754251AbcGHJ1N (ORCPT ); Fri, 8 Jul 2016 05:27:13 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34958 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbcGHJ1D (ORCPT ); Fri, 8 Jul 2016 05:27:03 -0400 Date: Fri, 8 Jul 2016 11:26:59 +0200 From: Ingo Molnar To: Borislav Petkov Cc: LKML , Yazen Ghannam Subject: Re: [PATCH 3/6] x86/mce: Add support for new MCA_SYND register Message-ID: <20160708092659.GB13849@gmail.com> References: <1467968983-4874-1-git-send-email-bp@alien8.de> <1467968983-4874-4-git-send-email-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467968983-4874-4-git-send-email-bp@alien8.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > From: Yazen Ghannam > > 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