Skip to contentSkip to conversation

x86/cpufeatures: Make AVX-VNNI depend on AVX

PATCH Applied Eric Biggers 2 participants 2 messages Feb 20, 2025 – Feb 21, 2025 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/cpufeatures: Make AVX-VNNI depend on AVX

From: Eric Biggers <[email protected]>

The noxsave option disables support for AVX, but support for the AVX-VNNI feature was still declared on CPUs that support it. Fix this.

---
 arch/x86/kernel/cpu/cpuid-deps.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/cpuid-deps.c +1 -0
index 8bd84114c2d96..df838e3bdbe02 100644
@@ -43,10 +43,11 @@ static const struct cpuid_dep cpuid_deps[] = {
 	{ X86_FEATURE_SSSE3,			X86_FEATURE_XMM2,     },
 	{ X86_FEATURE_F16C,			X86_FEATURE_XMM2,     },
 	{ X86_FEATURE_AES,			X86_FEATURE_XMM2      },
 	{ X86_FEATURE_SHA_NI,			X86_FEATURE_XMM2      },
 	{ X86_FEATURE_GFNI,			X86_FEATURE_XMM2      },
+	{ X86_FEATURE_AVX_VNNI,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_FMA,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_VAES,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_VPCLMULQDQ,		X86_FEATURE_AVX       },
 	{ X86_FEATURE_AVX2,			X86_FEATURE_AVX,      },
 	{ X86_FEATURE_AVX512F,			X86_FEATURE_AVX,      },

base-commit: 87a132e73910e8689902aed7f2fc229d6908383b

Signature · 1 line
2.48.1
merge bot Applied
#1 lore raw
The following commit has been merged into the x86/urgent branch of tip:

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     517120728484df1ab8b71cba8d2cad19f52f18a1
Gitweb:        https://git.kernel.org/tip/517120728484df1ab8b71cba8d2cad19f52f18a1
Author:        Eric Biggers <[email protected]>
AuthorDate:    Wed, 19 Feb 2025 22:01:24 -08:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Fri, 21 Feb 2025 14:19:16 +01:00

x86/cpufeatures: Make AVX-VNNI depend on AVX

The 'noxsave' boot option disables support for AVX, but support for the AVX-VNNI feature was still declared on CPUs that support it. Fix this.

---
 arch/x86/kernel/cpu/cpuid-deps.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/cpuid-deps.c +1 -0
index 8bd8411..df838e3 100644
@@ -45,6 +45,7 @@ static const struct cpuid_dep cpuid_deps[] = {
 	{ X86_FEATURE_AES,			X86_FEATURE_XMM2      },
 	{ X86_FEATURE_SHA_NI,			X86_FEATURE_XMM2      },
 	{ X86_FEATURE_GFNI,			X86_FEATURE_XMM2      },
+	{ X86_FEATURE_AVX_VNNI,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_FMA,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_VAES,			X86_FEATURE_AVX       },
 	{ X86_FEATURE_VPCLMULQDQ,		X86_FEATURE_AVX       },