Skip to content

Commit 3eced8b

Browse files
committed
KVM: x86/pmu: Rename check_pmu_event_filter() to pmc_is_event_allowed()
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>
1 parent 8709656 commit 3eced8b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/kvm/pmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static bool is_fixed_event_allowed(struct kvm_x86_pmu_event_filter *filter,
476476
return true;
477477
}
478478

479-
static bool check_pmu_event_filter(struct kvm_pmc *pmc)
479+
static bool pmc_is_event_allowed(struct kvm_pmc *pmc)
480480
{
481481
struct kvm_x86_pmu_event_filter *filter;
482482
struct kvm *kvm = pmc->vcpu->kvm;
@@ -502,7 +502,7 @@ static int reprogram_counter(struct kvm_pmc *pmc)
502502
emulate_overflow = pmc_pause_counter(pmc);
503503

504504
if (!pmc_is_globally_enabled(pmc) || !pmc_is_locally_enabled(pmc) ||
505-
!check_pmu_event_filter(pmc))
505+
!pmc_is_event_allowed(pmc))
506506
return 0;
507507

508508
if (emulate_overflow)
@@ -974,7 +974,7 @@ static void kvm_pmu_trigger_event(struct kvm_vcpu *vcpu,
974974
return;
975975

976976
kvm_for_each_pmc(pmu, pmc, i, bitmap) {
977-
if (!check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
977+
if (!pmc_is_event_allowed(pmc) || !cpl_is_matched(pmc))
978978
continue;
979979

980980
kvm_pmu_incr_counter(pmc);

0 commit comments

Comments
 (0)