lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[PATCH v3 0/3] KVM: x86: Intel LBR related perf cleanups.
From
WAS: Bug fixes and cleanups related to KVM's handling of PERF_CAPABILITIES.

Fix a bug where KVM incorrectly advertises PMU_CAP_LBR_FMT to userspace if
perf has disabled LBRs, e.g. because probing one or more LBR MSRs during
setup hit a #GP.

The non-KVM patches remove unnecessary stubs and unreachable error paths,
which allows for a cleaner fix for said bug.

v3:
- Drop patches for bug #1 (already merged).
- Drop misguided "clean up the capability check" patch. [Like]

v2:
- https://lore.kernel.org/all/20220803192658.860033-1-seanjc@google.com
- Add patches to fix bug #2. [Like]
- Add a patch to clean up the capability check.
- Tweak the changelog for the PMU refresh bug fix to call out that
KVM should disallow changing feature MSRs after KVM_RUN. [Like]

v1: https://lore.kernel.org/all/20220727233424.2968356-1-seanjc@google.com

Sean Christopherson (3):
perf/x86/core: Remove unnecessary stubs provided for KVM-only helpers
perf/x86/core: Drop the unnecessary return value from
x86_perf_get_lbr()
KVM: VMX: Advertise PMU LBRs if and only if perf supports LBRs

arch/x86/events/intel/lbr.c | 6 +---
arch/x86/include/asm/perf_event.h | 55 ++++++++-----------------------
arch/x86/kvm/vmx/capabilities.h | 5 ++-
3 files changed, 19 insertions(+), 47 deletions(-)


base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2
--
2.37.2.672.g94769d06f0-goog

\
 
 \ /
  Last update: 2022-08-31 02:01    [W:0.098 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site