x86/cpuid: expose MCDT_NO to guests
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 18 May 2022 09:21:49 +0000 (11:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 May 2022 09:21:49 +0000 (11:21 +0200)
Expose the MCDT_NO CPUID flag to guests if available.  The bit signals
that the CPU does not exhibit MCDT behavior, and as such can be
exposed without requiring any additional work.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/light/libxl_cpuid.c
tools/misc/xen-cpuid.c
xen/include/public/arch-x86/cpufeatureset.h

index d462f9e421ed734d0c06b1762667574c8ff9eaf6..67ba72dd84756450823915d0a728589150bb3454 100644 (file)
@@ -235,6 +235,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
         {"fsrcs",        0x00000007,  1, CPUID_REG_EAX, 12,  1},
 
         {"intel-psfd",   0x00000007,  2, CPUID_REG_EDX,  0,  1},
+        {"mcdt-no",      0x00000007,  2, CPUID_REG_EDX,  5,  1},
 
         {"lahfsahf",     0x80000001, NA, CPUID_REG_ECX,  0,  1},
         {"cmplegacy",    0x80000001, NA, CPUID_REG_ECX,  1,  1},
index 0b1b3333fe71b40266c78fa5cd3d90bbfdeee3c1..a9e0fb5d17e51dc4610406bfb0f6c09056be5bd9 100644 (file)
@@ -203,6 +203,8 @@ static const char *const str_7b1[32] =
 static const char *const str_7d2[32] =
 {
     [ 0] = "intel-psfd",
+
+    /* 4 */                 [ 5] = "mcdt-no",
 };
 
 static const struct {
index 9cee4b439e9fbe659e5f7289e7efaddab4d49bda..0c27f5bbaf37b7f572430b5c956ada9c5f2dc1d3 100644 (file)
@@ -304,6 +304,7 @@ XEN_CPUFEATURE(INTEL_PPIN,         12*32+ 0) /*   Protected Processor Inventory
 
 /* Intel-defined CPU features, CPUID level 0x00000007:2.edx, word 13 */
 XEN_CPUFEATURE(INTEL_PSFD,         13*32+ 0) /*A  MSR_SPEC_CTRL.PSFD */
+XEN_CPUFEATURE(MCDT_NO,            13*32+ 5) /*A  MCDT_NO */
 
 #endif /* XEN_CPUFEATURE */