Re: [PATCH v2] selftests/x86: Add a test for LASS enforcement
From: H. Peter Anvin
Date: Tue Oct 13 2026 - 19:07:40 EST
On 2026-10-13 12:51, Sohil Mehta wrote:
>
> I had it in v1 of this patch. It seemed excessive to do specifically for
> LASS:
> https://lore.kernel.org/lkml/20260806011536.4172258-8-sohil.mehta@xxxxxxxxx/
>
"Specificially for LASS" is the problem here.
This goes under the "do it generally, do it right, do it once." Librarize it.
> I agree, adding them as generic selftest helpers may be useful. But,
> /proc/cpuinfo has been unreliable in general. It is currently buggy for
> some features with Kconfig options. See:
>
> https://lore.kernel.org/lkml/f6f113b46199d996c4f81fc89858c2f484256418.1774623092.git.m.wieczorretman@xxxxx/
> Also, (I think) we have been generally discouraging folks to add more
> bits there. So, I don't know if creating these library routines is
> useful right now. IIUC, Boris said that the CPUID rework would make some
> of cpuinfo stuff moot.
>
> https://lore.kernel.org/lkml/20260331140216.GDacvT6IPW1gf003z-@fat_crate.local/
> Thoughts?
This is a great example of why these interfaces *are* useful and why they
*should* be fixed.
-hpa