As of SDM revision 076 there is a CPUID bit for this functionality. Use
it to amend the existing model-based logic.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
static const char *const str_7b1[32] =
{
+ [ 0] = "ppin",
};
static const struct {
/*
* Even if testing the presence of the MSR would be enough, we don't
* want to risk the situation where other models reuse this MSR for
- * other purposes.
+ * other purposes. Despite the late addition of a CPUID bit (rendering
+ * the MSR architectural), keep using the same detection logic there.
*/
switch ( c->x86_model )
{
uint64_t val;
+ default:
+ if ( !cpu_has(c, X86_FEATURE_INTEL_PPIN) )
+ {
+ ppin_msr = 0;
+ return;
+ }
+ fallthrough;
case 0x3e: /* IvyBridge X */
case 0x3f: /* Haswell X */
case 0x4f: /* Broadwell X */
XEN_CPUFEATURE(NSCB, 11*32+ 6) /*A Null Selector Clears Base (and limit too) */
/* Intel-defined CPU features, CPUID level 0x00000007:1.ebx, word 12 */
+XEN_CPUFEATURE(INTEL_PPIN, 12*32+ 0) /* Protected Processor Inventory Number */
#endif /* XEN_CPUFEATURE */