[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a8f9550-7c1b-4646-bdb8-04a7f1463511@linux.intel.com>
Date: Fri, 21 Nov 2025 08:53:29 +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>, Zide Chen <zide.chen@...el.com>,
Das Sandipan <Sandipan.Das@....com>, Shukla Manali <Manali.Shukla@....com>,
Xiaoyao Li <xiaoyao.li@...el.com>, Dapeng Mi <dapeng1.mi@...el.com>
Subject: Re: [kvm-unit-tests patch v3 5/8] x86/pmu: Relax precise count check
for emulated instructions tests
On 11/21/2025 6:29 AM, Sean Christopherson wrote:
> On Wed, Sep 03, 2025, Dapeng Mi wrote:
>> Relax precise count check for emulated instructions tests on these
>> platforms with HW overcount issues.
>>
>> Signed-off-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>
>> ---
>> x86/pmu.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/x86/pmu.c b/x86/pmu.c
>> index c54c0988..6bf6eee3 100644
>> --- a/x86/pmu.c
>> +++ b/x86/pmu.c
>> @@ -790,7 +790,7 @@ static void check_emulated_instr(void)
>>
>> // Check that the end count - start count is at least the expected
>> // number of instructions and branches.
>> - if (this_cpu_has_perf_global_ctrl()) {
>> + if (this_cpu_has_perf_global_ctrl() && !intel_inst_overcount_flags) {
> This skips precise checking if _either_ errata is present. IIUC, we can still do
> a precise check for branches retired on Clearwater Forest, but not for instructions
> retired.
Yes, this is correct.
>
>> report(instr_cnt.count - instr_start == KVM_FEP_INSNS,
>> "instruction count");
>> report(brnch_cnt.count - brnch_start == KVM_FEP_BRANCHES,
>> --
>> 2.34.1
>>
Powered by blists - more mailing lists