[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <420765a3-2187-42b4-a980-eabd0a44e0e0@linux.intel.com>
Date: Tue, 18 Feb 2025 17:42:34 +0800
From: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Jim Mattson <jmattson@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>, Xiong Zhang <xiong.y.zhang@...el.com>,
Zhenyu Wang <zhenyuw@...ux.intel.com>, Like Xu <like.xu.linux@...il.com>,
Jinrong Liang <cloudliang@...cent.com>, Yongwei Ma <yongwei.ma@...el.com>,
Dapeng Mi <dapeng1.mi@...el.com>
Subject: Re: [kvm-unit-tests patch v6 17/18] x86: pmu: Adjust lower boundary
of branch-misses event
On 2/15/2025 5:09 AM, Sean Christopherson wrote:
> On Sat, Sep 14, 2024, Dapeng Mi wrote:
>> @@ -205,6 +208,17 @@ static void adjust_events_range(struct pmu_event *gp_events,
>> gp_events[branch_idx].min = LOOP_BRANCHES;
>> gp_events[branch_idx].max = LOOP_BRANCHES;
>> }
>> +
>> + /*
>> + * For CPUs without IBPB support, no way to force to trigger a
>> + * branch miss and the measured branch misses is possible to be
>> + * 0. Thus overwrite the lower boundary of branch misses event
>> + * to 0 to avoid false positive.
>> + */
>> + if (!has_ibpb()) {
>> + /* branch misses event */
> This comment is worse than useless, because it necessitates curly braces.
Ah. Yes.
>
>> + gp_events[branch_miss_idx].min = 0;
>> + }
>> }
Powered by blists - more mailing lists