]> 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)
commita6cb53f1dceecd1aa4cff0988001954bc1ffa6f8
treeb5048fbb30c045a64a9cccdd01cb8ab14d3b7ac5
parentfe4419b7a60ae36bd3f64e82697aff4370d0aac2
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