lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <626806ff-7cd0-a6b4-c2f1-933d0a1924a2@gmail.com>
Date:   Wed, 26 Jan 2022 19:22:13 +0800
From:   Like Xu <like.xu.linux@...il.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        "Bangoria, Ravikumar" <ravi.bangoria@....com>,
        Ananth Narayan <ananth.narayan@....com>,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH kvm/queue v2 0/3] KVM: x86/pmu: Fix out-of-date AMD
 amd_event_mapping[]

cc AMD folks and ping for any comments.

On 17/1/2022 4:53 pm, Like Xu wrote:
> The current amd_event_mapping[] named "amd_perfmon_event_map" is only
> valid for "K7 and later, up to and including Family 16h" but for AMD
> "Family 17h and later", it needs amd_f17h_perfmon_event_mapp[] .
> 
> It's proposed to fix it in a more generic approach:
> - decouple the available_event_types from the CPUID 0x0A.EBX bit vector;
> - alway get the right perfmon_event_map[] form the hoser perf interface;
> - dynamically populate {inte|amd}_event_mapping[] during hardware setup;
> 
> v1 -> v2 Changelog:
> - Drop some merged patches and one misunderstood patch;
> - Rename bitmap name from "avail_cpuid_events" to "avail_perf_hw_ids";
> - Fix kernel test robot() compiler warning;
> 
> Previous:
> https://lore.kernel.org/kvm/20211112095139.21775-1-likexu@tencent.com/
> 
> Like Xu (3):
>    KVM: x86/pmu: Replace pmu->available_event_types with a new BITMAP
>    perf: x86/core: Add interface to query perfmon_event_map[] directly
>    KVM: x86/pmu: Setup the {inte|amd}_event_mapping[] when hardware_setup
> 
>   arch/x86/events/core.c            |  9 ++++
>   arch/x86/include/asm/kvm_host.h   |  2 +-
>   arch/x86/include/asm/perf_event.h |  2 +
>   arch/x86/kvm/pmu.c                | 25 ++++++++++-
>   arch/x86/kvm/pmu.h                |  2 +
>   arch/x86/kvm/svm/pmu.c            | 23 ++--------
>   arch/x86/kvm/vmx/pmu_intel.c      | 72 ++++++++++++++++++++-----------
>   arch/x86/kvm/x86.c                |  1 +
>   8 files changed, 89 insertions(+), 47 deletions(-)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ