Re: [PATCH 1/8] x86/fpu: Check for missing AVX and AVX-512 xstate bits
From: Christoph Hellwig
Date: Fri Jun 26 2026 - 01:42:01 EST
On Thu, Jun 25, 2026 at 09:37:24PM -0700, Eric Biggers wrote:
> If the CPU declares AVX or AVX-512 support, verify that the
> corresponding xstate bits are also set. If not, warn and clear them.
>
> This eliminates the perceived need for AVX and AVX-512 optimized code in
> the kernel to call cpu_has_xfeatures(). That has never been universally
> done, which strongly suggests that it has never really been needed in
> practice, but this should remove any remaining doubt.
I'll leave it to the x86-experts if the low-level details are right,
but the model behind this makes life so much easier, thanks a lot!