]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created
authorLike Xu <like.xu@linux.intel.com>
Tue, 23 Feb 2021 01:39:57 +0000 (09:39 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Feb 2021 17:07:35 +0000 (12:07 -0500)
commit67b45af946ec3148b64e6a3a1ee2ea8f79c5bc07
tree23dbe1641c65428ce38cf5b9f788f5696288972d
parent4a42d848db9544e3108875390886dc490d9c101e
KVM: vmx/pmu: Fix dummy check if lbr_desc->event is created

If lbr_desc->event is successfully created, the intel_pmu_create_
guest_lbr_event() will return 0, otherwise it will return -ENOENT,
and then jump to LBR msrs dummy handling.

Fixes: 1b5ac3226a1a ("KVM: vmx/pmu: Pass-through LBR msrs when the guest LBR event is ACTIVE")
Signed-off-by: Like Xu <like.xu@linux.intel.com>
Message-Id: <20210223013958.1280444-1-like.xu@linux.intel.com>
[Add "< 0" and PTR_ERR to make the code clearer. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/pmu_intel.c