]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Use binary search to check filtered events
authorJim Mattson <jmattson@google.com>
Sat, 15 Jan 2022 05:24:26 +0000 (21:24 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Jan 2022 17:11:26 +0000 (12:11 -0500)
commit4db5fc874f645ce262698efd239b7181af460e29
treeca61838cba2eef7e4d3ddeb5b6bf9b5cc29bed01
parentcb956d8574006c42deee52602ec7cb25b4b0517e
KVM: x86/pmu: Use binary search to check filtered events

The PMU event filter may contain up to 300 events. Replace the linear
search in reprogram_gp_counter() with a binary search.

Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220115052431.447232-2-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/pmu.c