]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps
authorSean Christopherson <seanjc@google.com>
Thu, 6 Oct 2022 00:03:11 +0000 (00:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:53:27 +0000 (11:53 +0200)
commit189cdd8fe7c6266ec5a220a0ef1cc4cfdd148d08
tree074408ff9dd09833ac7a6836d1daf4954ef1da19
parent0457b6d04fb7f80cb3c55057dfdf5b31848b0cc9
KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps

[ Upstream commit bec46859fb9d797a21c983100b1f425bebe89747 ]

Track KVM's supported PERF_CAPABILITIES in kvm_caps instead of computing
the supported capabilities on the fly every time.  Using kvm_caps will
also allow for future cleanups as the kvm_caps values can be used
directly in common x86 code.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Acked-by: Like Xu <likexu@tencent.com>
Message-Id: <20221006000314.73240-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Stable-dep-of: 098f4c061ea1 ("KVM: x86/pmu: Disallow legacy LBRs if architectural LBRs are available")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/capabilities.h
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.h