| .. | .. |
|---|
| 54 | 54 | #define SPEC_CTRL_RRSBA_DIS_S_SHIFT 6 /* Disable RRSBA behavior */ |
|---|
| 55 | 55 | #define SPEC_CTRL_RRSBA_DIS_S BIT(SPEC_CTRL_RRSBA_DIS_S_SHIFT) |
|---|
| 56 | 56 | |
|---|
| 57 | +/* A mask for bits which the kernel toggles when controlling mitigations */ |
|---|
| 58 | +#define SPEC_CTRL_MITIGATIONS_MASK (SPEC_CTRL_IBRS | SPEC_CTRL_STIBP | SPEC_CTRL_SSBD \ |
|---|
| 59 | + | SPEC_CTRL_RRSBA_DIS_S) |
|---|
| 60 | + |
|---|
| 57 | 61 | #define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */ |
|---|
| 58 | 62 | #define PRED_CMD_IBPB BIT(0) /* Indirect Branch Prediction Barrier */ |
|---|
| 63 | +#define PRED_CMD_SBPB BIT(7) /* Selective Branch Prediction Barrier */ |
|---|
| 59 | 64 | |
|---|
| 60 | 65 | #define MSR_PPIN_CTL 0x0000004e |
|---|
| 61 | 66 | #define MSR_PPIN 0x0000004f |
|---|
| .. | .. |
|---|
| 152 | 157 | * Not susceptible to Post-Barrier |
|---|
| 153 | 158 | * Return Stack Buffer Predictions. |
|---|
| 154 | 159 | */ |
|---|
| 160 | +#define ARCH_CAP_GDS_CTRL BIT(25) /* |
|---|
| 161 | + * CPU is vulnerable to Gather |
|---|
| 162 | + * Data Sampling (GDS) and |
|---|
| 163 | + * has controls for mitigation. |
|---|
| 164 | + */ |
|---|
| 165 | +#define ARCH_CAP_GDS_NO BIT(26) /* |
|---|
| 166 | + * CPU is not vulnerable to Gather |
|---|
| 167 | + * Data Sampling (GDS). |
|---|
| 168 | + */ |
|---|
| 155 | 169 | |
|---|
| 156 | 170 | #define MSR_IA32_FLUSH_CMD 0x0000010b |
|---|
| 157 | 171 | #define L1D_FLUSH BIT(0) /* |
|---|
| .. | .. |
|---|
| 170 | 184 | #define MSR_IA32_MCU_OPT_CTRL 0x00000123 |
|---|
| 171 | 185 | #define RNGDS_MITG_DIS BIT(0) |
|---|
| 172 | 186 | #define FB_CLEAR_DIS BIT(3) /* CPU Fill buffer clear disable */ |
|---|
| 187 | +#define GDS_MITG_DIS BIT(4) /* Disable GDS mitigation */ |
|---|
| 188 | +#define GDS_MITG_LOCKED BIT(5) /* GDS mitigation locked */ |
|---|
| 173 | 189 | |
|---|
| 174 | 190 | #define MSR_IA32_SYSENTER_CS 0x00000174 |
|---|
| 175 | 191 | #define MSR_IA32_SYSENTER_ESP 0x00000175 |
|---|
| .. | .. |
|---|
| 493 | 509 | #define MSR_AMD64_DE_CFG 0xc0011029 |
|---|
| 494 | 510 | #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1 |
|---|
| 495 | 511 | #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT) |
|---|
| 512 | +#define MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 9 |
|---|
| 496 | 513 | |
|---|
| 497 | 514 | #define MSR_AMD64_BU_CFG2 0xc001102a |
|---|
| 498 | 515 | #define MSR_AMD64_IBSFETCHCTL 0xc0011030 |
|---|
| .. | .. |
|---|
| 514 | 531 | #define MSR_AMD64_ICIBSEXTDCTL 0xc001103c |
|---|
| 515 | 532 | #define MSR_AMD64_IBSOPDATA4 0xc001103d |
|---|
| 516 | 533 | #define MSR_AMD64_IBS_REG_COUNT_MAX 8 /* includes MSR_AMD64_IBSBRTARGET */ |
|---|
| 534 | +#define MSR_AMD64_VM_PAGE_FLUSH 0xc001011e |
|---|
| 517 | 535 | #define MSR_AMD64_SEV_ES_GHCB 0xc0010130 |
|---|
| 518 | 536 | #define MSR_AMD64_SEV 0xc0010131 |
|---|
| 519 | 537 | #define MSR_AMD64_SEV_ENABLED_BIT 0 |
|---|