OSDN Git Service

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)
commit761875634a5e2c3fed36c439fc4acac6f85a96eb
treeb5048fbb30c045a64a9cccdd01cb8ab14d3b7ac5
parent006a0f0607e1504950dd8fa3b6ca8e438ec6c9d2
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