aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx/pmu_intel.c
diff options
context:
space:
mode:
authorGravatar Sean Christopherson <seanjc@google.com> 2022-10-06 00:03:11 +0000
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2022-11-09 12:31:11 -0500
commitbec46859fb9d797a21c983100b1f425bebe89747 (patch)
tree91aa73353d95b3b0e380414363ea2905c7d222b1 /arch/x86/kvm/vmx/pmu_intel.c
parentperf/x86/core: Zero @lbr instead of returning -1 in x86_perf_get_lbr() stub (diff)
downloadlinux-bec46859fb9d797a21c983100b1f425bebe89747.tar.gz
linux-bec46859fb9d797a21c983100b1f425bebe89747.tar.bz2
linux-bec46859fb9d797a21c983100b1f425bebe89747.zip
KVM: x86: Track supported PERF_CAPABILITIES in kvm_caps
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>
Diffstat (limited to 'arch/x86/kvm/vmx/pmu_intel.c')
-rw-r--r--arch/x86/kvm/vmx/pmu_intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/pmu_intel.c b/arch/x86/kvm/vmx/pmu_intel.c
index 10b33da9bd05..9fabfe71fd87 100644
--- a/arch/x86/kvm/vmx/pmu_intel.c
+++ b/arch/x86/kvm/vmx/pmu_intel.c
@@ -631,7 +631,7 @@ static void intel_pmu_init(struct kvm_vcpu *vcpu)
pmu->fixed_counters[i].current_config = 0;
}
- vcpu->arch.perf_capabilities = vmx_get_perf_capabilities();
+ vcpu->arch.perf_capabilities = kvm_caps.supported_perf_cap;
lbr_desc->records.nr = 0;
lbr_desc->event = NULL;
lbr_desc->msr_passthrough = false;