summaryrefslogtreecommitdiff
path: root/include/kvm
diff options
context:
space:
mode:
authorAlexandru Elisei <alexandru.elisei@arm.com>2022-01-27 16:17:57 +0000
committerMarc Zyngier <maz@kernel.org>2022-02-08 17:51:21 +0000
commitdb858060b1a788fba03711793dcaff19ea43286c (patch)
tree171defca9e6ad849df7718791af2848f949af082 /include/kvm
parent46b18782147248b62f00e98a7f87abaf934951e8 (diff)
downloadlinux-next-db858060b1a788fba03711793dcaff19ea43286c.tar.gz
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
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_pmu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index f9ed4c171d7b..20193416d214 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -29,6 +29,11 @@ struct kvm_pmu {
struct irq_work overflow_work;
};
+struct arm_pmu_entry {
+ struct list_head entry;
+ struct arm_pmu *arm_pmu;
+};
+
DECLARE_STATIC_KEY_FALSE(kvm_arm_pmu_available);
static __always_inline bool kvm_arm_support_pmu_v3(void)