x86/vPMU: Extend vPMU support to version 5
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Mon, 26 Apr 2021 08:21:09 +0000 (10:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:21:09 +0000 (10:21 +0200)
Version 5 is backwards compatible with version 3. This allows to enable
vPMU on Ice Lake CPUs.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/cpu/vpmu_intel.c

index 64334c5fabcba25e034b038482bce637222db189..f59cae543868115733ac32fae883a02eb9cb893a 100644 (file)
@@ -839,7 +839,7 @@ int vmx_vpmu_initialise(struct vcpu *v)
         return 0;
 
     if ( v->domain->arch.cpuid->basic.pmu_version <= 1 ||
-         v->domain->arch.cpuid->basic.pmu_version >= 5 )
+         v->domain->arch.cpuid->basic.pmu_version >= 6 )
         return -EINVAL;
 
     if ( (arch_pmc_cnt + fixed_pmc_cnt) == 0 )
@@ -909,8 +909,9 @@ int __init core2_vpmu_init(void)
     switch ( version )
     {
     case 4:
-        printk(XENLOG_INFO "VPMU: PMU version 4 is not fully supported. "
-               "Emulating version 3\n");
+    case 5:
+        printk(XENLOG_INFO "VPMU: PMU version %u is not fully supported. "
+               "Emulating version 3\n", version);
         /* FALLTHROUGH */
 
     case 2: