]> Git Repo - linux.git/commit
KVM: arm64: Iterate arm_pmus list to probe for default PMU
authorOliver Upton <[email protected]>
Thu, 25 May 2023 21:27:21 +0000 (21:27 +0000)
committerMarc Zyngier <[email protected]>
Wed, 31 May 2023 09:29:56 +0000 (10:29 +0100)
commit1c913a1c35aa61cf280173b2bcc133c3953c38fc
tree8a8dd2a1feeeec1d0659a02a4b5cf7b5f0748287
parentf6a27d6dc51b288106adaf053cff9c9b9cc12c4e
KVM: arm64: Iterate arm_pmus list to probe for default PMU

To date KVM has relied on using a perf event to probe the core PMU at
the time of vPMU initialization. Behind the scenes perf_event_init()
would iteratively walk the PMUs of the system and return the PMU that
could handle the event. However, an upcoming change in perf core will
drop the iterative walk, thereby breaking the fragile dance we do on the
KVM side.

Avoid the problem altogether by iterating over the list of supported
PMUs maintained in KVM, returning the core PMU that matches the CPU
we were called on.

Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Oliver Upton <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/arm64/kvm/pmu-emul.c
This page took 0.052835 seconds and 4 git commands to generate.