]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Extract check_pmu_event_filter() handling both GP and fixed counters
authorLike Xu <likexu@tencent.com>
Wed, 18 May 2022 13:25:03 +0000 (21:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:48:45 +0000 (04:48 -0400)
commitaa0473ae120b99604bb87a5aad08509e9f8bf924
tree383624a737a2eeab7a48e144636c8c498e4aa075
parent8e84ec56041b25e5aa52b24c50561b9ca124333c
KVM: x86/pmu: Extract check_pmu_event_filter() handling both GP and fixed counters

Checking the kvm->arch.pmu_event_filter policy in both gp and fixed
code paths was somewhat redundant, so common parts can be extracted,
which reduces code footprint and improves readability.

Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <20220518132512.37864-3-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/pmu.c