[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13de6271-61bc-7138-15b3-9241508d94fa@redhat.com>
Date: Tue, 1 Feb 2022 13:28:18 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Like Xu <like.xu.linux@...il.com>,
Jim Mattson <jmattson@...gle.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, Like Xu <likexu@...cent.com>
Subject: Re: [PATCH kvm/queue v2 3/3] KVM: x86/pmu: Setup the
{inte|amd}_event_mapping[] when hardware_setup
On 1/17/22 09:53, Like Xu wrote:
> +
> + for (i = 0; i < PERF_COUNT_HW_MAX; i++) {
> + config = perf_get_hw_event_config(i) & 0xFFFFULL;
> +
> + kernel_hw_events[i] = (struct kvm_event_hw_type_mapping){
> + .eventsel = config & ARCH_PERFMON_EVENTSEL_EVENT,
> + .unit_mask = (config & ARCH_PERFMON_EVENTSEL_UMASK) >> 8,
> + .event_type = i,
> + };
Should event_type be PERF_COUNT_HW_MAX if config is zero?
Thanks,
Paolo
Powered by blists - more mailing lists