summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-08-05 22:05:23 +0300
committerSean Christopherson <seanjc@google.com>2025-08-19 21:59:41 +0300
commit8709656514c1106933befcdefdcc5fd9bc013ed2 (patch)
treefd3fb5d68e19f57f9ae4f676c2b800bb6d274863
parent58baa649ea09e7b719d0ef51aba894d63c2bb64f (diff)
downloadlinux-8709656514c1106933befcdefdcc5fd9bc013ed2.tar.xz
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>
-rw-r--r--arch/x86/kvm/pmu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index 744717d379cb..b7514082e1ac 100644
--- a/arch/x86/kvm/pmu.c
+++ b/arch/x86/kvm/pmu.c
@@ -974,8 +974,7 @@ static void kvm_pmu_trigger_event(struct kvm_vcpu *vcpu,
return;
kvm_for_each_pmc(pmu, pmc, i, bitmap) {
- if (!pmc_is_locally_enabled(pmc) ||
- !check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
+ if (!check_pmu_event_filter(pmc) || !cpl_is_matched(pmc))
continue;
kvm_pmu_incr_counter(pmc);