]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: Only apply PMCR_EL0.P to the guest range of counters
authorOliver Upton <oliver.upton@linux.dev>
Tue, 17 Dec 2024 17:56:11 +0000 (09:56 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 18 Dec 2024 21:22:25 +0000 (13:22 -0800)
commite96d8b80afd3f63ffad58c0fdd5e0c380c4c404e
tree622182ef18c419d851b7e31a9d9e65d3cbf9494a
parentd3ba35b69eaed060bbc92a99bf027627bad170eb
KVM: arm64: Only apply PMCR_EL0.P to the guest range of counters

An important distinction from other registers affected by HPMN is that
PMCR_EL0 only affects the guest range of counters, regardless of the EL
from which it is accessed. Ensure that PMCR_EL0.P is always applied to
'guest' counters by manually computing the mask rather than deriving it
from the current context.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241217175611.3658290-1-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/pmu-emul.c