]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: x86/aes-gcm - clean up AVX512 code to assume 512-bit vectors
authorEric Biggers <ebiggers@kernel.org>
Thu, 2 Oct 2025 02:31:13 +0000 (19:31 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 27 Oct 2025 03:37:41 +0000 (20:37 -0700)
commit4b582e0fb38e86d80d318304e61ae464125a9558
tree1cf65647188b05a5ef83059ac6d257227a1f54f0
parent12beec21c50950cc9a1907750200af4eb99a8aca
crypto: x86/aes-gcm - clean up AVX512 code to assume 512-bit vectors

aes-gcm-vaes-avx512.S (originally aes-gcm-avx10-x86_64.S) was designed
to support multiple maximum vector lengths, while still utilizing AVX512
/ AVX10 features such as the increased number of vector registers.
However, the support for multiple maximum vector lengths turned out to
not be useful.  Support for maximum vector lengths other than 512 bits
was removed from the AVX10 specification, which leaves "avoiding
overly-eager downclocking" as the only remaining use case for limiting
AVX512 / AVX10 code to 256-bit vectors.  But this issue has gone away in
new CPUs, and the separate VAES+AVX2 code which I ended up having to
write anyway provides nearly as good 256-bit support.

Therefore, clean up this code to not be written in terms of a generic
vector length, but rather just assume 512-bit vectors.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251002023117.37504-5-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/x86/crypto/aes-gcm-vaes-avx512.S