aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-08-02 11:55:07 -0700
committerSean Christopherson <seanjc@google.com>2024-11-01 09:22:33 -0700
commita1039111192b3b8c76c3b1a334b62376df3c2885 (patch)
treed4c4d012c2ff07ceb1ceac27f81dd49face73c24
parentKVM: x86: Reject userspace attempts to access PERF_CAPABILITIES w/o PDCM (diff)
downloadwireguard-linux-a1039111192b3b8c76c3b1a334b62376df3c2885.tar.xz
wireguard-linux-a1039111192b3b8c76c3b1a334b62376df3c2885.zip
KVM: VMX: Remove restriction that PMU version > 0 for PERF_CAPABILITIES
Drop the restriction that the PMU version is non-zero when handling writes to PERF_CAPABILITIES now that KVM unconditionally checks for PDCM support. Link: https://lore.kernel.org/r/20240802185511.305849-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
-rw-r--r--arch/x86/kvm/vmx/vmx.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index f0326927d4e1..11a1d70f5ad7 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2456,8 +2456,6 @@ int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
vmx->pt_desc.guest.addr_a[index / 2] = data;
break;
case MSR_IA32_PERF_CAPABILITIES:
- if (data && !vcpu_to_pmu(vcpu)->version)
- return 1;
if (data & PMU_CAP_LBR_FMT) {
if ((data & PMU_CAP_LBR_FMT) !=
(kvm_caps.supported_perf_cap & PMU_CAP_LBR_FMT))