[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <add089ff-49d9-40a9-a020-5f4eb876aef8@linux.intel.com>
Date: Tue, 18 Feb 2025 17:36:19 +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>,
Like Xu <like.xu.linux@...il.com>, Jinrong Liang <cloudliang@...cent.com>,
Dapeng Mi <dapeng1.mi@...el.com>
Subject: Re: [kvm-unit-tests patch v6 08/18] x86: pmu: Fix cycles event
validation failure
On 2/15/2025 5:07 AM, Sean Christopherson wrote:
> On Sat, Sep 14, 2024, Dapeng Mi wrote:
>> +static void warm_up(void)
>> +{
>> + int i = 8;
>> +
>> + /*
>> + * Since cycles event is always run as the first event, there would be
>> + * a warm-up state to warm up the cache, it leads to the measured cycles
>> + * value may exceed the pre-defined cycles upper boundary and cause
>> + * false positive. To avoid this, introduce an warm-up state before
>> + * the real verification.
>> + */
>> + while (i--)
>> + loop();
> Use a for-loop.
Sure.
>
>> +}
>> +
>> static void check_counters(void)
>> {
>> if (is_fep_available())
>> check_emulated_instr();
>>
>> + warm_up();
>> check_gp_counters();
>> check_fixed_counters();
>> check_rdpmc();
>> --
>> 2.40.1
>>
Powered by blists - more mailing lists