Skip to content
Commit d338d878 authored by Like Xu's avatar Like Xu Committed by Sean Christopherson
Browse files

KVM: x86/pmu: Advertise PERFCTR_CORE iff the min nr of counters is met



Enable and advertise PERFCTR_CORE if and only if the minimum number of
required counters are available, i.e. if perf says there are less than six
general purpose counters.

Opportunistically, use kvm_cpu_cap_check_and_set() instead of open coding
the check for host support.

Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarLike Xu <likexu@tencent.com>
[sean: massage shortlog and changelog]
Link: https://lore.kernel.org/r/20230603011058.1038821-9-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 6a08083f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment