x86/vPMU: Extend vPMU support to version 5
PATCH 1/1 x86/vPMU: Extend vPMU support to version 5
Version 5 is backwards compatible with version 3. This allows to enable vPMU on Ice Lake CPUs.
Signed-off-by Igor Druzhinin <[email protected]>
--- xen/arch/x86/cpu/vpmu_intel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
xen/arch/x86/cpu/vpmu_intel.c +4 -3
@@ -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 :
Signature · 1 line
2.7.4
Quoted 4 lines · Igor Druzhinin
Version 5 is backwards compatible with version 3. This allows to enable vPMU on Ice Lake CPUs.
Signed-off-by Igor Druzhinin <[email protected]>
Acked-by Jan Beulich <[email protected]>
Quoted 7 lines · Jan Beulich
Quoted 4 lines · Igor Druzhinin
Version 5 is backwards compatible with version 3. This allows to enable vPMU on Ice Lake CPUs.
Signed-off-by Igor Druzhinin <[email protected]>Acked-by Jan Beulich <[email protected]>
Actually I've just noticed that I can't ack this, as the source file is deemed part of VT-x. I wonder whether we should drop this, as it's been quite a while since vPMU code was made HVM-independent.
Jan
Quoted 7 lines
From: Igor Druzhinin <[email protected]>
Sent: Wednesday, April 14, 2021 1:25 AMVersion 5 is backwards compatible with version 3. This allows to enable vPMU on Ice Lake CPUs.
Signed-off-by Igor Druzhinin <[email protected]>
Reviewed-by Kevin Tian <[email protected]>
Quoted 32 lines
--- xen/arch/x86/cpu/vpmu_intel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)xen/arch/x86/cpu/vpmu_intel.c +4
-4@@ -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 : --2.7.4