OSDN Git Service

KVM: arm64: Keep a list of probed PMUs
authorAlexandru Elisei <alexandru.elisei@arm.com>
Thu, 27 Jan 2022 16:17:57 +0000 (16:17 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 8 Feb 2022 17:51:21 +0000 (17:51 +0000)
commitdb858060b1a788fba03711793dcaff19ea43286c
tree171defca9e6ad849df7718791af2848f949af082
parent46b18782147248b62f00e98a7f87abaf934951e8
KVM: arm64: Keep a list of probed PMUs

The ARM PMU driver calls kvm_host_pmu_init() after probing to tell KVM that
a hardware PMU is available for guest emulation. Heterogeneous systems can
have more than one PMU present, and the callback gets called multiple
times, once for each of them. Keep track of all the PMUs available to KVM,
as they're going to be needed later.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220127161759.53553-5-alexandru.elisei@arm.com
arch/arm64/kvm/pmu-emul.c
include/kvm/arm_pmu.h