Re: [PATCH v3 09/14] x86/svm: Deflake svm_tsc_scale_test

From: Yosry Ahmed

Date: Fri Nov 14 2025 - 00:46:43 EST


On Thu, Nov 13, 2025 at 04:34:35PM -0800, Sean Christopherson wrote:
> On Mon, Nov 10, 2025, Yosry Ahmed wrote:
> > On an AMT Turin (EPYC Zen 5), svm_tsc_scale_test flakes on the last test
> > case with 0.0001 TSC scaling ratio, even with the 24-bit shift for
> > stability. On failure, the actual value is 49 instead of the expected
> > 50.
> >
> > Use a higher scaling ratio, 0.001, which makes the test pass
> > consistently.
>
> Top-tier analysis right here :-D

Not my proudest moment :P

I saw the test is already using some arbitrary numbers and I was too
lazy to do what Jim did. I initially had a patch that allows for a
certain % error instead, like the selftest, but I opted for the simple
change :P

In my defense, I did call it not-so-sophisticated in the cover letter!

>
> I'm going to take Jim's version instead of papering over the bug.
>
> https://lore.kernel.org/all/CALMp9eQep3H-OtqmLe3O2MsOT-Vx4y0-LordKgN+pkp04VLSWw@xxxxxxxxxxxxxx

I am actually glad there's a better patch than mine :)