]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/cpufeatures: Fix dependencies for GFNI, VAES, and VPCLMULQDQ
authorEric Biggers <ebiggers@google.com>
Wed, 17 Apr 2024 06:04:34 +0000 (23:04 -0700)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 18 Apr 2024 15:27:52 +0000 (17:27 +0200)
commit9543f6e26634537997b6e909c20911b7bf4876de
tree766da8089957a45e514e7b7432327b250205cbb9
parenta4b37f5033fa812f02f3b7bd1242393d347ba791
x86/cpufeatures: Fix dependencies for GFNI, VAES, and VPCLMULQDQ

Fix cpuid_deps[] to list the correct dependencies for GFNI, VAES, and
VPCLMULQDQ.  These features don't depend on AVX512, and there exist CPUs
that support these features but not AVX512.  GFNI actually doesn't even
depend on AVX.

This prevents GFNI from being unnecessarily disabled if AVX is disabled
to mitigate the GDS vulnerability.

This also prevents all three features from being unnecessarily disabled
if AVX512VL (or its dependency AVX512F) were to be disabled, but it
looks like there isn't any case where this happens anyway.

Fixes: c128dbfa0f87 ("x86/cpufeatures: Enable new SSE/AVX/AVX512 CPU features")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20240417060434.47101-1-ebiggers@kernel.org
arch/x86/kernel/cpu/cpuid-deps.c