Re: [PATCH 1/8] x86/fpu: Check for missing AVX and AVX-512 xstate bits
Christoph Hellwig <[email protected]> Fri, 26 Jun 2026 07:39:55 +0200
| Newsgroups | org.infradead.lists.linux-um,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-raid |
|---|---|
| Message-ID | <[email protected]> |
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!