aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2025-03-05 12:26:32 -0800
committerOliver Upton <oliver.upton@linux.dev>2025-03-11 12:54:23 -0700
commit6f34024d185e2fa6636c660431c4595a6529328d (patch)
treef23caff594e36b59cfc9e103a8a7f0dbb4f9d1b1 /include/kvm
parentKVM: arm64: Always support SW_INCR PMU event (diff)
downloadlinux-6f34024d185e2fa6636c660431c4595a6529328d.tar.gz
linux-6f34024d185e2fa6636c660431c4595a6529328d.zip
KVM: arm64: Use a cpucap to determine if system supports FEAT_PMUv3
KVM is about to learn some new tricks to virtualize PMUv3 on IMPDEF hardware. As part of that, we now need to differentiate host support from guest support for PMUv3. Add a cpucap to determine if an architectural PMUv3 is present to guard host usage of PMUv3 controls. Tested-by: Janne Grunau <j@jannau.net> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250305202641.428114-6-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_pmu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 147bd3ee4f7b..3a8edd78240f 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -86,7 +86,7 @@ void kvm_vcpu_pmu_resync_el0(void);
*/
#define kvm_pmu_update_vcpu_events(vcpu) \
do { \
- if (!has_vhe() && kvm_arm_support_pmu_v3()) \
+ if (!has_vhe() && system_supports_pmuv3()) \
vcpu->arch.pmu.events = *kvm_get_pmu_events(); \
} while (0)