[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlksA1gR0ehoU2VP@hirez.programming.kicks-ass.net>
Date: Fri, 15 Apr 2022 10:25:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Like Xu <like.xu.linux@...il.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Jim Mattson <jmattson@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Joerg Roedel <joro@...tes.org>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, Like Xu <likexu@...cent.com>
Subject: Re: [PATCH v3 09/11] perf: x86/core: Add interface to query
perfmon_event_map[] directly
On Mon, Apr 11, 2022 at 05:35:35PM +0800, Like Xu wrote:
> From: Like Xu <likexu@...cent.com>
>
> Currently, we have [intel|knc|p4|p6]_perfmon_event_map on the Intel
> platforms and amd_[f17h]_perfmon_event_map on the AMD platforms.
>
> Early clumsy KVM code or other potential perf_event users may have
> hard-coded these perfmon_maps (e.g., arch/x86/kvm/svm/pmu.c), so
> it would not make sense to program a common hardware event based
> on the generic "enum perf_hw_id" once the two tables do not match.
>
> Let's provide an interface for callers outside the perf subsystem to get
> the counter config based on the perfmon_event_map currently in use,
> and it also helps to save bytes.
>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Like Xu <likexu@...cent.com>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Powered by blists - more mailing lists