diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2023-05-26 00:27:21 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-05-31 12:29:56 +0300 |
commit | 1c913a1c35aa61cf280173b2bcc133c3953c38fc (patch) | |
tree | 8a8dd2a1feeeec1d0659a02a4b5cf7b5f0748287 /mm/maccess.c | |
parent | f6a27d6dc51b288106adaf053cff9c9b9cc12c4e (diff) | |
download | linux-1c913a1c35aa61cf280173b2bcc133c3953c38fc.tar.xz |
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 <nathan@kernel.org>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230525212723.3361524-2-oliver.upton@linux.dev
Diffstat (limited to 'mm/maccess.c')
0 files changed, 0 insertions, 0 deletions