[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d97c42ad-79ee-4eb0-ba89-85efdfd2c8f7@linux.intel.com>
Date: Wed, 6 Aug 2025 15:35:42 +0800
From: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, Xin Li
<xin@...or.com>, Sandipan Das <sandipan.das@....com>
Subject: Re: [PATCH 16/18] KVM: x86/pmu: Rename check_pmu_event_filter() to
pmc_is_event_allowed()
On 8/6/2025 3:05 AM, Sean Christopherson wrote:
> 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.
>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
> arch/x86/kvm/pmu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
> index 422af7734846..e75671b6e88c 100644
> --- a/arch/x86/kvm/pmu.c
> +++ b/arch/x86/kvm/pmu.c
> @@ -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)
> @@ -969,7 +969,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);
Reviewed-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>
Powered by blists - more mailing lists