]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: x86/pmu: Rename check_pmu_event_filter() to pmc_is_event_allowed()
authorSean Christopherson <seanjc@google.com>
Tue, 5 Aug 2025 19:05:24 +0000 (12:05 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 19 Aug 2025 18:59:41 +0000 (11:59 -0700)
Rename check_pmu_event_filter() to make its polarity more obvious, and to
connect the dots to is_gp_event_allowed() and is_fixed_event_allowed().

No functional change intended.

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20250805190526.1453366-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/pmu.c

index b7514082e1acaacea72d941ebb0848f618adf2bd..a1b8223a11f81b8b0ca1ead1f2fb8e564759c7fc 100644 (file)
@@ -476,7 +476,7 @@ static bool is_fixed_event_allowed(struct kvm_x86_pmu_event_filter *filter,
        return true;
 }
 
-static bool check_pmu_event_filter(struct kvm_pmc *pmc)
+static bool pmc_is_event_allowed(struct kvm_pmc *pmc)
 {
        struct kvm_x86_pmu_event_filter *filter;
        struct kvm *kvm = pmc->vcpu->kvm;
@@ -502,7 +502,7 @@ static int reprogram_counter(struct kvm_pmc *pmc)
        emulate_overflow = pmc_pause_counter(pmc);
 
        if (!pmc_is_globally_enabled(pmc) || !pmc_is_locally_enabled(pmc) ||
-           !check_pmu_event_filter(pmc))
+           !pmc_is_event_allowed(pmc))
                return 0;
 
        if (emulate_overflow)
@@ -974,7 +974,7 @@ static void kvm_pmu_trigger_event(struct kvm_vcpu *vcpu,
                return;
 
        kvm_for_each_pmc(pmu, pmc, i, bitmap) {
-               if (!check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
+               if (!pmc_is_event_allowed(pmc) || !cpl_is_matched(pmc))
                        continue;
 
                kvm_pmu_incr_counter(pmc);