Re: [PATCH v4 17/21] KVM: x86/pmu: Factor out fixed counter control bit calculation

From: Yosry Ahmed

Date: Wed Nov 18 2026 - 11:20:39 EST


On Thu, Nov 12, 2026 at 01:32:23PM -0700, Zide Chen wrote:
> Rename intel_pmu_enable_fixed_counter_bits() to
> intel_pmu_fixed_ctrl_bits() and have it return the computed fixed
> counter control mask instead of updating fixed_ctr_ctrl_rsvd directly.
>
> Accumulate the desired fixed counter control bits during PMU setup and
> apply them once in intel_pmu_refresh().
>
> Move the helper earlier in the file so it can also be reused for
> upcoming ANYTHREAD_DEPRECATION emulation.
>
> No functional change intended.
>
> Signed-off-by: Zide Chen <zide.chen@xxxxxxxxx>
> Reviewed-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
> Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>

Reviewed-by: Yosry Ahmed <yosry@xxxxxxxxxx>