Skip to content

Commit 1e340c6

Browse files
dwmw2KAGA-KOKO
authored andcommitted
x86/msr: Add definitions for new speculation control MSRs
Add MSR and bit definitions for SPEC_CTRL, PRED_CMD and ARCH_CAPABILITIES. See Intel's 336996-Speculative-Execution-Side-Channel-Mitigations.pdf Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: gnomes@lxorguk.ukuu.org.uk Cc: ak@linux.intel.com Cc: ashok.raj@intel.com Cc: dave.hansen@intel.com Cc: karahmed@amazon.de Cc: arjan@linux.intel.com Cc: torvalds@linux-foundation.org Cc: peterz@infradead.org Cc: bp@alien8.de Cc: pbonzini@redhat.com Cc: tim.c.chen@linux.intel.com Cc: gregkh@linux-foundation.org Link: https://lkml.kernel.org/r/1516896855-7642-5-git-send-email-dwmw@amazon.co.uk
1 parent 5d10cbc commit 1e340c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939

4040
/* Intel MSRs. Some also available on other CPUs */
4141

42+
#define MSR_IA32_SPEC_CTRL 0x00000048 /* Speculation Control */
43+
#define SPEC_CTRL_IBRS (1 << 0) /* Indirect Branch Restricted Speculation */
44+
#define SPEC_CTRL_STIBP (1 << 1) /* Single Thread Indirect Branch Predictors */
45+
46+
#define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */
47+
#define PRED_CMD_IBPB (1 << 0) /* Indirect Branch Prediction Barrier */
48+
4249
#define MSR_PPIN_CTL 0x0000004e
4350
#define MSR_PPIN 0x0000004f
4451

@@ -57,6 +64,11 @@
5764
#define SNB_C3_AUTO_UNDEMOTE (1UL << 28)
5865

5966
#define MSR_MTRRcap 0x000000fe
67+
68+
#define MSR_IA32_ARCH_CAPABILITIES 0x0000010a
69+
#define ARCH_CAP_RDCL_NO (1 << 0) /* Not susceptible to Meltdown */
70+
#define ARCH_CAP_IBRS_ALL (1 << 1) /* Enhanced IBRS support */
71+
6072
#define MSR_IA32_BBL_CR_CTL 0x00000119
6173
#define MSR_IA32_BBL_CR_CTL3 0x0000011e
6274

0 commit comments

Comments
 (0)