Skip to content

Commit 52f6490

Browse files
Peter Zijlstra (Intel)KAGA-KOKO
authored andcommitted
x86: Add TSX Force Abort CPUID/MSR
Skylake systems will receive a microcode update to address a TSX errata. This microcode will (by default) clobber PMC3 when TSX instructions are (speculatively or not) executed. It also provides an MSR to cause all TSX transaction to abort and preserve PMC3. Add the CPUID enumeration and MSR definition. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 11f8b2d commit 52f6490

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
345345
#define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */
346346
#define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */
347+
#define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */
347348
#define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */
348349
#define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */
349350
#define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,12 @@
666666

667667
#define MSR_IA32_TSC_DEADLINE 0x000006E0
668668

669+
670+
#define MSR_TSX_FORCE_ABORT 0x0000010F
671+
672+
#define MSR_TFA_RTM_FORCE_ABORT_BIT 0
673+
#define MSR_TFA_RTM_FORCE_ABORT BIT_ULL(MSR_TFA_RTM_FORCE_ABORT_BIT)
674+
669675
/* P4/Xeon+ specific */
670676
#define MSR_IA32_MCG_EAX 0x00000180
671677
#define MSR_IA32_MCG_EBX 0x00000181

0 commit comments

Comments
 (0)