Skip to content

Commit bc12edb

Browse files
ashok-rajIngo Molnar
authored andcommitted
x86/mce: Add Local MCE definitions
Add required definitions to support Local Machine Check Exceptions. Historically, machine check exceptions on Intel x86 processors have been broadcast to all logical processors in the system. Upcoming CPUs will support an opt-in mechanism to request some machine check exceptions be delivered to a single logical processor experiencing the fault. See http://www.intel.com/sdm Volume 3, System Programming Guide, chapter 15 for more information on MSRs and documentation on Local MCE. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1433436928-31903-15-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 5c31b28 commit bc12edb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/x86/include/asm/mce.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@
1717
#define MCG_EXT_CNT(c) (((c) & MCG_EXT_CNT_MASK) >> MCG_EXT_CNT_SHIFT)
1818
#define MCG_SER_P (1ULL<<24) /* MCA recovery/new status bits */
1919
#define MCG_ELOG_P (1ULL<<26) /* Extended error log supported */
20+
#define MCG_LMCE_P (1ULL<<27) /* Local machine check supported */
2021

2122
/* MCG_STATUS register defines */
2223
#define MCG_STATUS_RIPV (1ULL<<0) /* restart ip valid */
2324
#define MCG_STATUS_EIPV (1ULL<<1) /* ip points to correct instruction */
2425
#define MCG_STATUS_MCIP (1ULL<<2) /* machine check in progress */
26+
#define MCG_STATUS_LMCES (1ULL<<3) /* LMCE signaled */
27+
28+
/* MCG_EXT_CTL register defines */
29+
#define MCG_EXT_CTL_LMCE_EN (1ULL<<0) /* Enable LMCE */
2530

2631
/* MCi_STATUS register defines */
2732
#define MCI_STATUS_VAL (1ULL<<63) /* valid error */

arch/x86/include/uapi/asm/msr-index.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#define MSR_IA32_MCG_CAP 0x00000179
5757
#define MSR_IA32_MCG_STATUS 0x0000017a
5858
#define MSR_IA32_MCG_CTL 0x0000017b
59+
#define MSR_IA32_MCG_EXT_CTL 0x000004d0
5960

6061
#define MSR_OFFCORE_RSP_0 0x000001a6
6162
#define MSR_OFFCORE_RSP_1 0x000001a7
@@ -379,6 +380,7 @@
379380
#define FEATURE_CONTROL_LOCKED (1<<0)
380381
#define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1)
381382
#define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2)
383+
#define FEATURE_CONTROL_LMCE (1<<20)
382384

383385
#define MSR_IA32_APICBASE 0x0000001b
384386
#define MSR_IA32_APICBASE_BSP (1<<8)

0 commit comments

Comments
 (0)