This option allows for fine tuning of the facilities Xen will use, after
accounting for hardware capabilities as enumerated via CPUID.
+Unless otherwise noted, options only have any effect in their negative form,
+to hide the named feature(s). Ignoring a feature using this mechanism will
+cause Xen not to use the feature, nor offer them as usable to guests.
+
Currently accepted:
The Speculation Control hardware features `srbds-ctrl`, `md-clear`, `ibrsb`,
`stibp`, `ibpb`, `l1d-flush` and `ssbd` are used by default if available and
-applicable. They can be ignored, e.g. `no-ibrsb`, at which point Xen won't
-use them itself, and won't offer them to guests.
+applicable. They can all be ignored.
+
+`rdrand` and `rdseed` can be ignored, as a mitigation to XSA-320 /
+CVE-2020-0543.
### cpuid\_mask\_cpu (AMD only)
> `= fam_0f_rev_c | fam_0f_rev_d | fam_0f_rev_e | fam_0f_rev_f | fam_0f_rev_g | fam_10_rev_b | fam_10_rev_c | fam_11_rev_b`
int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
{
#define NA XEN_CPUID_INPUT_UNUSED
- struct cpuid_flags cpuid_flags[] = {
+ static const struct cpuid_flags cpuid_flags[] = {
{"maxleaf", 0x00000000, NA, CPUID_REG_EAX, 0, 32},
/* the following two entries are subject to tweaking later in the code */
{"family", 0x00000001, NA, CPUID_REG_EAX, 8, 8},
{"clflush", 0x00000001, NA, CPUID_REG_EBX, 8, 8},
{"brandid", 0x00000001, NA, CPUID_REG_EBX, 0, 8},
{"hypervisor", 0x00000001, NA, CPUID_REG_ECX, 31, 1},
+ {"rdrand", 0x00000001, NA, CPUID_REG_ECX, 30, 1},
{"f16c", 0x00000001, NA, CPUID_REG_ECX, 29, 1},
{"avx", 0x00000001, NA, CPUID_REG_ECX, 28, 1},
{"osxsave", 0x00000001, NA, CPUID_REG_ECX, 27, 1},
{"fpu", 0x00000001, NA, CPUID_REG_EDX, 0, 1},
{"srbds-ctrl", 0x00000007, 0, CPUID_REG_EDX, 9, 1},
{"md-clear", 0x00000007, 0, CPUID_REG_EDX, 10, 1},
+ {"rdseed", 0x00000007, 0, CPUID_REG_EBX, 18, 1},
{"ibrsb", 0x00000007, 0, CPUID_REG_EDX, 26, 1},
{"stibp", 0x00000007, 0, CPUID_REG_EDX, 27, 1},
{"l1d-flush", 0x00000007, 0, CPUID_REG_EDX, 28, 1},
#undef NA
char *sep, *val, *endptr;
int i;
- struct cpuid_flags *flag;
+ const struct cpuid_flags *flag;
struct libxl__cpuid_policy *entry;
unsigned long num;
char flags[33], *resstr;