]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/pmu: Add kvm_pmu_cap to optimize perf_get_x86_pmu_capability
authorLike Xu <likexu@tencent.com>
Mon, 11 Apr 2022 10:19:44 +0000 (18:19 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:48:16 +0000 (04:48 -0400)
commit29ab5a8e1e3ef746c7b9cb86145029cad60b2e06
treeadef023fd2e68efe0e593c1a55e8f61aad158471
parent14e60aa838cb430e3dc767f515661085ad1723d6
KVM: x86/pmu: Add kvm_pmu_cap to optimize perf_get_x86_pmu_capability

The information obtained from the interface perf_get_x86_pmu_capability()
doesn't change, so an exported "struct x86_pmu_capability" is introduced
for all guests in the KVM, and it's initialized before hardware_setup().

Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20220411101946.20262-16-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c