Skip to content

Commit 8709656

Browse files
committed
KVM: x86/pmu: Drop redundant check on PMC being locally enabled for emulation
Drop the check on a PMC being locally enabled when triggering emulated events, as the bitmap of passed-in PMCs only contains locally enabled PMCs. Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Link: https://lore.kernel.org/r/20250805190526.1453366-16-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 58baa64 commit 8709656

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/x86/kvm/pmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,7 @@ static void kvm_pmu_trigger_event(struct kvm_vcpu *vcpu,
974974
return;
975975

976976
kvm_for_each_pmc(pmu, pmc, i, bitmap) {
977-
if (!pmc_is_locally_enabled(pmc) ||
978-
!check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
977+
if (!check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
979978
continue;
980979

981980
kvm_pmu_incr_counter(pmc);

0 commit comments

Comments
 (0)