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

KVM: x86/pmu: Rewrite reprogram_counters() to improve performance



A valid pmc is always tested before using pmu->reprogram_pmi. Eliminate
this part of the redundancy by setting the counter's bitmask directly,
and in addition, trigger KVM_REQ_PMU only once to save more cpu cycles.

Signed-off-by: default avatarLike Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20230214050757.9623-4-likexu@tencent.com
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 8bca8c5c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment