Thread (12 messages) 12 messages, 3 authors, 2026-08-14

Re: [PATCH v3 0/8] x86: Remove cpu_has_xfeatures() and add AVX-512 xor_gen()

flat view

From: Eric Biggers <ebiggers@kernel.org>
Date: 2026-08-14 19:59:41
Also in: linux-crypto, linux-um, lkml

On Thu, Aug 13, 2026 at 05:35:17PM -0700, Borislav Petkov wrote:
On Wed, Aug 12, 2026 at 07:14:58PM -0700, Eric Biggers wrote:
quoted
This series consolidates and cleans up how the kernel handles CPU
feature flags for AVX and AVX-512 when the underlying OS or hypervisor
(if any) doesn't enable the required xstate features in XCR0.

Specifically, it makes the checks for xstate features be done in a
single place at boot time for both UML and native x86, instead of
everywhere kernel code wants to check for AVX or AVX-512 support.

Patch 8 then adds an AVX-512 optimized implementation of xor_gen() for
RAID, which had been blocked on confusion around cpu_has_xfeatures() and
its lack of implementation on UML.
Sashiko complains about a missing VZEROUPPER there in patch 8:

https://sashiko.dev/#/patchset/20260813021506.55129-1-ebiggers%40kernel.org
Yeah, missing vzeroupper is a common mistake...  All the other code in
lib/raid/ that uses ymm and zmm registers misses it too.  I've fixed
various instances of this in the crypto code before, but no one ever
checked the RAID code.  I guess I'll send out a v4 that fixes patch 8,
and also separate patches that try to fix all the existing instances of
missing vzeroupper.  Besides lib/raid/, some also have slipped in in
arch/x86/crypto/aria-* and net/netfilter/nft_set_pipapo_avx2.c.

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help