KVM: arm64: PMU: Introduce helpers to set the guest's PMU
authorReiji Watanabe <reijiw@google.com>
Fri, 20 Oct 2023 21:40:41 +0000 (21:40 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 24 Oct 2023 19:07:33 +0000 (19:07 +0000)
commit1616ca6f3c10723c1b60ae44724212fae88f502d
tree876ed93aaf68d2478df6cdf20069183fe0e34626
parent6465e260f48790807eef06b583b38ca9789b6072
KVM: arm64: PMU: Introduce helpers to set the guest's PMU

Introduce new helper functions to set the guest's PMU
(kvm->arch.arm_pmu) either to a default probed instance or to a
caller requested one, and use it when the guest's PMU needs to
be set. These helpers will make it easier for the following
patches to modify the relevant code.

No functional change intended.

Reviewed-by: Sebastian Ott <sebott@redhat.com>
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231020214053.2144305-2-rananta@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/pmu-emul.c