[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7de112b2-e6d1-1f9d-a040-1c4cfee40b22@gmail.com>
Date: Wed, 9 Feb 2022 17:00:16 +0800
From: Like Xu <like.xu.linux@...il.com>
To: Jim Mattson <jmattson@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
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, Like Xu <likexu@...cent.com>
Subject: Re: [PATCH v2 2/6] KVM: x86/pmu: Refactoring find_arch_event() to
pmc_perf_hw_id()
On 5/2/2022 9:55 am, Jim Mattson wrote:
>> +static unsigned int amd_pmc_perf_hw_id(struct kvm_pmc *pmc)
>> {
>> + u8 event_select = pmc->eventsel & ARCH_PERFMON_EVENTSEL_EVENT;
> On AMD, the event select is 12 bits.
Out of your carefulness, we already know this fact.
This function to get the perf_hw_id by the last 16 bits still works because we
currently
do not have a 12-bits-select event defined in the amd_event_mapping[]. The
12-bits-select
events (if any) will be programed in the type of PERF_TYPE_RAW.
IMO, a minor patch that renames some AMD variables and updates the relevant comments
to avoid misunderstandings is quite acceptable.
Thanks,
Like Xu
Powered by blists - more mailing lists