]> www.infradead.org Git - users/hch/misc.git/commit
KVM: arm64: Use a cpucap to determine if system supports FEAT_PMUv3
authorOliver Upton <oliver.upton@linux.dev>
Wed, 5 Mar 2025 20:26:32 +0000 (12:26 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 11 Mar 2025 19:54:23 +0000 (12:54 -0700)
commit6f34024d185e2fa6636c660431c4595a6529328d
treef23caff594e36b59cfc9e103a8a7f0dbb4f9d1b1
parented335722b4571c438c008fc96bf86b9d4705a60f
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>
arch/arm64/include/asm/cpucaps.h
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/pmu.c
arch/arm64/tools/cpucaps
include/kvm/arm_pmu.h