]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Compute PMCEID from arm_pmu's event bitmaps
authorOliver Upton <oliver.upton@linux.dev>
Wed, 5 Mar 2025 20:26:30 +0000 (12:26 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 11 Mar 2025 19:52:32 +0000 (12:52 -0700)
commit93b01528586b693a3ab31ed7be92b2347a9416ca
tree6810dd5a484a0df848bc7491d5d870a56929e89a
parent46573d944f00f440dc794fa87ebbdb0dd9dbf691
KVM: arm64: Compute PMCEID from arm_pmu's event bitmaps

The PMUv3 driver populates a couple of bitmaps with the values of
PMCEID{0,1}, from which the guest's PMCEID{0,1} can be derived. This
is particularly convenient when virtualizing PMUv3 on IMP DEF hardware,
as reading the nonexistent PMCEID registers leads to a rather unpleasant
UNDEF.

Tested-by: Janne Grunau <j@jannau.net>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250305202641.428114-4-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/pmu-emul.c