From: Like Xu <like.xu.linux@gmail.com>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
David Dunn <daviddunn@google.com>,
Stephane Eranian <eranian@google.com>,
Kim Phillips <kim.phillips@amd.com>,
Jim Mattson <jmattson@google.com>
Subject: Re: [PATCH v2 2/6] KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()
Date: Wed, 16 Feb 2022 15:44:04 +0800 [thread overview]
Message-ID: <71689d29-caf8-ed7e-2cd7-61cbab0fc7e0@gmail.com> (raw)
In-Reply-To: <4373e8d7-e3e8-164c-75e3-6ca495a79167@amd.com>
On 14/2/2022 6:14 pm, Ravi Bangoria wrote:
>
>
> On 11-Feb-22 11:46 PM, Jim Mattson wrote:
>> On Fri, Feb 11, 2022 at 1:56 AM Ravi Bangoria <ravi.bangoria@amd.com> wrote:
>>>
>>>
>>>
>>> On 10-Feb-22 4:58 PM, Like Xu wrote:
>>>> cc Kim and Ravi to help confirm more details about this change.
>>>>
>>>> On 10/2/2022 3:30 am, Jim Mattson wrote:
>>>>> By the way, the following events from amd_event_mapping[] are not
>>>>> listed in the Milan PPR:
>>>>> { 0x7d, 0x07, PERF_COUNT_HW_CACHE_REFERENCES }
>>>>> { 0x7e, 0x07, PERF_COUNT_HW_CACHE_MISSES }
>>>>> { 0xd0, 0x00, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND }
>>>>> { 0xd1, 0x00, PERF_COUNT_HW_STALLED_CYCLES_BACKEND }
>>>>>
>>>>> Perhaps we should build a table based on amd_f17h_perfmon_event_map[]
>>>>> for newer AMD processors?
So do we need another amd_f19h_perfmon_event_map[] in the host perf code ?
>>>
>>> I think Like's other patch series to unify event mapping across kvm
>>> and host will fix it. No?
>>> https://lore.kernel.org/lkml/20220117085307.93030-4-likexu@tencent.com
>>
>> Yes, that should fix it. But why do we even bother? What is the
>> downside of using PERF_TYPE_RAW all of the time?
>
> There are few places where PERF_TYPE_HARDWARE and PERF_TYPE_RAW are treated
> differently. Ex, x86_pmu_event_init(), perf_init_event(). So I think it makes
> sense to keep using PERF_TYPE_HARDWARE for generalized events?
>
> Ravi
next prev parent reply other threads:[~2022-02-16 7:44 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 7:42 [PATCH v2 0/6] KVM: x86/pmu: Count two basic events for emulated instructions Like Xu
2021-11-30 7:42 ` [PATCH v2 1/6] KVM: x86/pmu: Setup pmc->eventsel for fixed PMCs Like Xu
2021-12-06 19:57 ` Jim Mattson
2021-12-09 18:49 ` Paolo Bonzini
2021-12-09 18:53 ` Jim Mattson
2021-12-09 18:57 ` Paolo Bonzini
2021-12-10 10:20 ` Like Xu
[not found] ` <CALMp9eTq8H_bJOVKwi_7j3Kum9RvW6o-G3zCLUFco1A1cvNrkQ@mail.gmail.com>
2021-12-07 6:07 ` Like Xu
2021-12-07 17:42 ` Jim Mattson
2021-11-30 7:42 ` [PATCH v2 2/6] KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id() Like Xu
2021-12-09 3:52 ` Jim Mattson
2021-12-09 8:11 ` Like Xu
2021-12-09 19:24 ` Paolo Bonzini
2022-02-05 1:55 ` Jim Mattson
2022-02-09 9:00 ` Like Xu
2022-02-09 19:30 ` Jim Mattson
2022-02-10 11:28 ` Like Xu
2022-02-11 9:56 ` Ravi Bangoria
2022-02-11 18:16 ` Jim Mattson
2022-02-14 10:14 ` Ravi Bangoria
2022-02-16 7:44 ` Like Xu [this message]
2022-02-16 11:24 ` Ravi Bangoria
2021-11-30 7:42 ` [PATCH v2 3/6] KVM: x86/pmu: Reuse pmc_perf_hw_id() and drop find_fixed_event() Like Xu
2021-12-09 3:58 ` Jim Mattson
2021-11-30 7:42 ` [PATCH v2 4/6] KVM: x86/pmu: Add pmc->intr to refactor kvm_perf_overflow{_intr}() Like Xu
2021-12-09 4:25 ` Jim Mattson
2021-12-09 8:28 ` Like Xu
2021-12-10 0:54 ` Jim Mattson
2021-12-10 9:35 ` Paolo Bonzini
2021-12-10 10:11 ` Like Xu
2021-12-10 22:55 ` Jim Mattson
2021-12-10 22:59 ` Paolo Bonzini
2021-12-10 23:31 ` Jim Mattson
2021-12-12 4:56 ` Jim Mattson
2021-12-13 6:37 ` Jim Mattson
2021-12-16 9:57 ` Like Xu
2021-12-16 17:52 ` Jim Mattson
2021-11-30 7:42 ` [PATCH v2 5/6] KVM: x86: Update vPMCs when retiring instructions Like Xu
2021-12-09 4:33 ` Jim Mattson
2021-12-09 8:44 ` Like Xu
2021-12-09 9:23 ` Like Xu
2021-11-30 7:42 ` [PATCH v2 6/6] KVM: x86: Update vPMCs when retiring branch instructions Like Xu
2021-12-09 4:40 ` Jim Mattson
2021-12-09 19:30 ` [PATCH v2 0/6] KVM: x86/pmu: Count two basic events for emulated instructions Paolo Bonzini
2021-12-16 10:14 ` Like Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71689d29-caf8-ed7e-2cd7-61cbab0fc7e0@gmail.com \
--to=like.xu.linux@gmail.com \
--cc=daviddunn@google.com \
--cc=eranian@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kim.phillips@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=ravi.bangoria@amd.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox