lkml.org 
[lkml]   [2022]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCH 0/7] KVM: x86/pmu: Fix some corner cases including Intel PEBS
    Date
    Good well-designed tests can help us find more bugs, especially when
    the test steps differ from the Linux kernel behaviour in terms of the
    timing of access to virtualized hw resources.

    A new guest PEBS kvm-unit-test constructs a number of typical and
    corner use cases to demonstrate how fragile the earlier PEBS
    enabling patch set is. I prefer to reveal these flaws and fix them
    myself before we receive complaints from projects that rely on it.

    In this patch series, there is one small optimization (006), one hardware
    surprise (002), and most of these fixes have stepped on my little toes.

    Please feel free to add more tests or share comments.

    Like Xu (7):
    perf/x86/core: Update x86_pmu.pebs_capable for ICELAKE_{X,D}
    perf/x86/core: Completely disable guest PEBS via guest's global_ctrl
    KVM: x86/pmu: Avoid setting BIT_ULL(-1) to pmu->host_cross_mapped_mask
    KVM: x86/pmu: Not to generate PEBS records for emulated instructions
    KVM: x86/pmu: Avoid using PEBS perf_events for normal counters
    KVM: x86/pmu: Defer reprogram_counter() to kvm_pmu_handle_event()
    KVM: x86/pmu: Defer counter emulated overflow via pmc->stale_counter

    arch/x86/events/intel/core.c | 4 ++-
    arch/x86/include/asm/kvm_host.h | 5 ++--
    arch/x86/kvm/pmu.c | 43 +++++++++++++++++++++------------
    arch/x86/kvm/svm/pmu.c | 2 +-
    arch/x86/kvm/vmx/pmu_intel.c | 29 +++++++++++-----------
    5 files changed, 49 insertions(+), 34 deletions(-)

    --
    2.37.0

    \
     
     \ /
      Last update: 2022-07-13 14:27    [W:2.842 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site