]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: pmu: Restore compilation when HW_PERF_EVENTS isn't selected
authorMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 12:02:24 +0000 (13:02 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 12:42:41 +0000 (13:42 +0100)
commit169e0116d81d4918ccdb29487c9fa677aacc2e2b
tree1abd41c115b03613d63c7357c1661051208fd748
parenta989cbe1f57ab38b2349f55cae01a974453a9b6a
KVM: arm64: pmu: Restore compilation when HW_PERF_EVENTS isn't selected

Moving kvm_pmu_events into the vcpu (and refering to it) broke the
somewhat unusual case where the kernel has no support for a PMU
at all.

In order to solve this, move things around a bit so that we can
easily avoid refering to the pmu structure outside of PMU-aware
code. As a bonus, pmu.c isn't compiled in when HW_PERF_EVENTS
isn't selected.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/202205161814.KQHpOzsJ-lkp@intel.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/nvhe/switch.c
include/kvm/arm_pmu.h