linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Andi Kleen <andi.kleen@intel.com>
Cc: Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org, Boris Petkov <bp@suse.de>
Subject: [PATCH 2/2] mcelog: Print the PPIN in machine check records when it is available
Date: Thu, 17 Nov 2016 16:35:47 -0800	[thread overview]
Message-ID: <1479429348-1664-1-git-send-email-tony.luck@intel.com> (raw)

From: Tony Luck <tony.luck@intel.com>

Intel Xeons from Ivy Bridge onwards support a processor identification
number. Kernels v4.9 and higher include it in the "mce" record.

Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 mcelog.c | 3 +++
 mcelog.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/mcelog.c b/mcelog.c
index 7214a0d23f65..e79996db9b5b 100644
--- a/mcelog.c
+++ b/mcelog.c
@@ -441,6 +441,9 @@ static void dump_mce(struct mce *m, unsigned recordlen)
 	if (n > 0)
 		Wprintf("\n");
 
+	if (recordlen >= offsetof(struct mce, ppin) && m->ppin)
+		n += Wprintf("PPIN %llx\n", m->ppin);
+
 	if (recordlen >= offsetof(struct mce, cpuid) && m->cpuid) {
 		u32 fam, mod;
 		parse_cpuid(m->cpuid, &fam, &mod);
diff --git a/mcelog.h b/mcelog.h
index 254b3a092fba..9a54077e5474 100644
--- a/mcelog.h
+++ b/mcelog.h
@@ -31,6 +31,9 @@ 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 */
+	__u64 ipid;	/* MCA_IPID MSR: only valid on SMCA systems */
+	__u64 ppin;	/* Protected Processor Inventory Number */
 };
 
 #define X86_VENDOR_INTEL	0
-- 
2.7.4

             reply	other threads:[~2016-11-18  0:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  0:35 Luck, Tony [this message]
2016-11-18  0:35 ` [PATCH 1/2] x86/mce: Include the PPIN in machine check records when it is available Luck, Tony
2016-11-18 13:00   ` Borislav Petkov
2016-11-18 16:42     ` Luck, Tony
2016-11-18 17:02     ` Andi Kleen
2016-11-18 17:45       ` Borislav Petkov
2016-11-18 17:48       ` [PATCH v2] " Luck, Tony
2016-11-23 11:48         ` Borislav Petkov
2016-11-23 13:29           ` Henrique de Moraes Holschuh
2016-11-23 13:37             ` Borislav Petkov
2016-11-23 14:05               ` Borislav Petkov
2016-11-23 16:42                 ` Tony Luck
2016-11-23 16:55                   ` Borislav Petkov
2016-11-23 17:29               ` Henrique de Moraes Holschuh
2016-11-23 20:56                 ` Tony Luck
2016-11-24 11:20                   ` Henrique de Moraes Holschuh
2016-11-23 15:58           ` [tip:ras/core] x86/mce: Include the PPIN in MCE records when available tip-bot for Tony Luck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479429348-1664-1-git-send-email-tony.luck@intel.com \
    --to=tony.luck@intel.com \
    --cc=andi.kleen@intel.com \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).