Merge branch 'kvm-arm64/kill_oprofile_dependency' into kvmarm-master/next
authorMarc Zyngier <maz@kernel.org>
Thu, 22 Apr 2021 12:41:49 +0000 (13:41 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 22 Apr 2021 12:41:49 +0000 (13:41 +0100)
Signed-off-by: Marc Zyngier <maz@kernel.org>
1  2 
arch/arm64/kvm/perf.c

@@@ -50,13 -50,7 +50,7 @@@ static struct perf_guest_info_callback
  
  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)
++      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);