OSDN Git Service

KVM: x86/pmu: Refactor PERF_GLOBAL_CTRL update helper for reuse by PEBS
authorLike Xu <likexu@tencent.com>
Thu, 22 Sep 2022 20:40:38 +0000 (13:40 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 28 Sep 2022 19:47:21 +0000 (12:47 -0700)
commitc0245b774203f7341ddb1cce29a6ee607857f325
treeabd81812394e926801334dd89c2d6302d27b6865
parentf331601c65ad217a5c000ce20c26266d3f0aceb3
KVM: x86/pmu: Refactor PERF_GLOBAL_CTRL update helper for reuse by PEBS

Extract the "global ctrl" specific bits out of global_ctrl_changed() so
that the helper only deals with reprogramming general purpose counters,
and rename the helper accordingly.  PEBS needs the same logic, i.e needs
to reprogram counters associated when PEBS_ENABLE bits are toggled, and
will use the helper in a future fix.

No functional change intended.

Signed-off-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20220831085328.45489-4-likexu@tencent.com
[sean: split to separate patch, write changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/pmu_intel.c