]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Compute synthetic sysreg ESR for Apple PMUv3 traps
authorOliver Upton <oliver.upton@linux.dev>
Wed, 5 Mar 2025 20:26:36 +0000 (12:26 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 11 Mar 2025 19:54:29 +0000 (12:54 -0700)
commit2c433f70dccc1af6922931404bfe23d215bdfff0
tree06dd25c4c9bebd9633fc4834b096235e08594f3a
parent56290316a443709957f958e4e40bc93e0213bcc3
KVM: arm64: Compute synthetic sysreg ESR for Apple PMUv3 traps

Apple M* CPUs provide an IMPDEF trap for PMUv3 sysregs, where ESR_EL2.EC
is a reserved value (0x3F) and a sysreg-like ISS is reported in
AFSR1_EL2.

Compute a synthetic ESR for these PMUv3 traps, giving the illusion of
something architectural to the rest of KVM.

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