]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Setup pmc->eventsel for fixed PMCs
authorLike Xu <likexu@tencent.com>
Tue, 30 Nov 2021 07:42:16 +0000 (15:42 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Jan 2022 15:44:41 +0000 (10:44 -0500)
commita920262b9a2dbb24ce03b1bab0f244533dd5e62b
treeb5048fbb30c045a64a9cccdd01cb8ab14d3b7ac5
parent58baec0c36ee97e5f11d5efe02de4ecbd213fee7
KVM: x86/pmu: Setup pmc->eventsel for fixed PMCs

The current pmc->eventsel for fixed counter is underutilised. The
pmc->eventsel can be setup for all known available fixed counters
since we have mapping between fixed pmc index and
the intel_arch_events array.

Either gp or fixed counter, it will simplify the later checks for
consistency between eventsel and perf_hw_id.

Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20211130074221.93635-2-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/pmu_intel.c