summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/perf.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-04-22 13:41:49 +0100
committerMarc Zyngier <maz@kernel.org>2021-04-22 13:41:49 +0100
commit9a8aae605b80fc0a830cdce747eed48e11acc067 (patch)
treec3d138d0c96f9303ec117398f9b96c256f9a09f3 /arch/arm64/kvm/perf.c
parent4085ae809334f036ec01790d1bac41a8ec3116da (diff)
parent7f318847a0f37b96d8927e8d30ae7b8f149b11f1 (diff)
downloadlinux-stable-9a8aae605b80fc0a830cdce747eed48e11acc067.tar.gz
linux-stable-9a8aae605b80fc0a830cdce747eed48e11acc067.tar.bz2
linux-stable-9a8aae605b80fc0a830cdce747eed48e11acc067.zip
Merge branch 'kvm-arm64/kill_oprofile_dependency' into kvmarm-master/next
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/perf.c')
-rw-r--r--arch/arm64/kvm/perf.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm64/kvm/perf.c b/arch/arm64/kvm/perf.c
index 8f860ae56bb7..151c31fb9860 100644
--- a/arch/arm64/kvm/perf.c
+++ b/arch/arm64/kvm/perf.c
@@ -50,13 +50,7 @@ static struct perf_guest_info_callbacks kvm_guest_cbs = {
int kvm_perf_init(void)
{
- /*
- * Check if HW_PERF_EVENTS are supported by checking the number of
- * hardware performance counters. This could ensure the presence of
- * a physical PMU and CONFIG_PERF_EVENT is selected.
- */
- if (IS_ENABLED(CONFIG_ARM_PMU) && perf_num_counters() > 0
- && !is_protected_kvm_enabled())
+ if (kvm_pmu_probe_pmuver() != 0xf && !is_protected_kvm_enabled())
static_branch_enable(&kvm_arm_pmu_available);
return perf_register_guest_info_callbacks(&kvm_guest_cbs);