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)
commit89cb454ea984d0411523dc10e70e9bf0aca1b527
tree383624a737a2eeab7a48e144636c8c498e4aa075
parenta33095f4937b362306f8636742450cff1c4630af
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