x86/spec-ctrl: Enumerations for DDP controls

https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/data-dependent-prefetcher.html

We should offer DDP-CTRL to guests, but I'm not sure when it is appearing in
hardware, and it's not massively urgent - the DDP behaviour is mostly sane
(having been designed in a post-spectre world) and this is a just-in-case
control.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2023-03-13 11:26:26 +00:00
1 parent 9276e832ae
commit d04ae78c34
4 files changed
+4 -1

No files matched your search

+1
View File
@@ -242,6 +242,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
{"intel-psfd", 0x00000007, 2, CPUID_REG_EDX, 0, 1},
{"ipred-ctrl", 0x00000007, 2, CPUID_REG_EDX, 1, 1},
{"rrsba-ctrl", 0x00000007, 2, CPUID_REG_EDX, 2, 1},
{"ddp-ctrl", 0x00000007, 2, CPUID_REG_EDX, 3, 1},
{"bhi-ctrl", 0x00000007, 2, CPUID_REG_EDX, 4, 1},
{"mcdt-no", 0x00000007, 2, CPUID_REG_EDX, 5, 1},
+1 -1
View File
@@ -216,7 +216,7 @@ static const char *const str_7d1[32] =
static const char *const str_7d2[32] =
{
[ 0] = "intel-psfd", [ 1] = "ipred-ctrl",
[ 2] = "rrsba-ctrl",
[ 2] = "rrsba-ctrl", [ 3] = "ddp-ctrl",
[ 4] = "bhi-ctrl", [ 5] = "mcdt-no",
};
+1
View File
@@ -41,6 +41,7 @@
#define SPEC_CTRL_RRSBA_DIS_U (_AC(1, ULL) << 5)
#define SPEC_CTRL_RRSBA_DIS_S (_AC(1, ULL) << 6)
#define SPEC_CTRL_PSFD (_AC(1, ULL) << 7)
#define SPEC_CTRL_DDP_DIS_U (_AC(1, ULL) << 8)
#define SPEC_CTRL_BHI_DIS_S (_AC(1, ULL) << 10)
#define MSR_PRED_CMD 0x00000049
@@ -294,6 +294,7 @@ XEN_CPUFEATURE(INTEL_PPIN, 12*32+ 0) /* Protected Processor Inventory
XEN_CPUFEATURE(INTEL_PSFD, 13*32+ 0) /*A MSR_SPEC_CTRL.PSFD */
XEN_CPUFEATURE(IPRED_CTRL, 13*32+ 1) /* MSR_SPEC_CTRL.IPRED_DIS_* */
XEN_CPUFEATURE(RRSBA_CTRL, 13*32+ 2) /* MSR_SPEC_CTRL.RRSBA_DIS_* */
XEN_CPUFEATURE(DDP_CTRL, 13*32+ 3) /* MSR_SPEC_CTRL.DDP_DIS_U */
XEN_CPUFEATURE(BHI_CTRL, 13*32+ 4) /* MSR_SPEC_CTRL.BHI_DIS_S */
XEN_CPUFEATURE(MCDT_NO, 13*32+ 5) /*A MCDT_NO */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.