x86/cpufeatures: Make AVX512_BMM depend on AVX512F
PATCH 1/1 x86/cpufeatures: Make AVX512_BMM depend on AVX512F
Add an explicit dependency between X86_FEATURE_AVX512_BMM and X86_FEATURE_AVX512F in the CPUID dependency table.
AVX512 Bit Matrix Multiply (BMM) instructions operate on vector registers and require AVX512 Foundation support. Declaring this dependency ensures that if AVX512F is disabled (e.g. via clearcpuid or host capabilities), AVX512_BMM will be automatically cleared as well.
--- arch/x86/kernel/cpu/cpuid-deps.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/cpuid-deps.c +1 -0
@@ -75,6 +75,7 @@ static const struct cpuid_dep cpuid_deps[] = { { X86_FEATURE_SDCIAE, X86_FEATURE_CAT_L3 }, { X86_FEATURE_AVX512_BF16, X86_FEATURE_AVX512VL }, { X86_FEATURE_AVX512_FP16, X86_FEATURE_AVX512BW }, + { X86_FEATURE_AVX512_BMM, X86_FEATURE_AVX512F }, { X86_FEATURE_ENQCMD, X86_FEATURE_XSAVES }, { X86_FEATURE_PER_THREAD_MBA, X86_FEATURE_MBA }, { X86_FEATURE_SGX_LC, X86_FEATURE_SGX },
Signature · 1 line
2.55.0.141.g00534a21ce-goog
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Build failure due to undeclared identifier X86_FEATURE_AVX512_BMM. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Build failure due to undeclared identifier X86_FEATURE_AVX512_BMM. --
--- Patch [1]: [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F --- commit 5ec2859f67a824ceedb01518734f6afb9a711eef
Author: Jim Mattson <[email protected]>
x86/cpufeatures: Make AVX512_BMM depend on AVX512F
This commit explicitly declares a CPUID dependency for AVX512_BMM on AVX512F so that disabling AVX512F automatically clears AVX512_BMM.
arch/x86/kernel/cpu/cpuid-deps.c static const struct cpuid_dep cpuid_deps[] = { · line 78
Quoted 9 lines
arch/x86/kernel/cpu/cpuid-deps.c +1
-0@@ -75,6 +75,7 @@ static const struct cpuid_dep cpuid_deps[] = { { X86_FEATURE_SDCIAE, X86_FEATURE_CAT_L3 }, { X86_FEATURE_AVX512_BF16, X86_FEATURE_AVX512VL }, { X86_FEATURE_AVX512_FP16, X86_FEATURE_AVX512BW }, + { X86_FEATURE_AVX512_BMM, X86_FEATURE_AVX512F },
[Severity: Low]
Is X86_FEATURE_AVX512_BMM defined anywhere in the tree? It appears this macro is undeclared, which will cause a build failure when compiling arch/x86/kernel/cpu/cpuid-deps.c.
Quoted 3 lines
arch/x86/kernel/cpu/cpuid-deps.c +0
-0{ X86_FEATURE_ENQCMD, X86_FEATURE_XSAVES }, { X86_FEATURE_PER_THREAD_MBA, X86_FEATURE_MBA }, { X86_FEATURE_SGX_LC, X86_FEATURE_SGX },
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 10 lines · Jim Mattson
Add an explicit dependency between
X86_FEATURE_AVX512_BMMandX86_FEATURE_AVX512Fin the CPUID dependency table.AVX512 Bit Matrix Multiply (BMM) instructions operate on vector registers and require AVX512 Foundation support. Declaring this dependency ensures that if AVX512F is disabled (e.g. via clearcpuid or host capabilities),
AVX512_BMMwill be automatically cleared as well.Fixes de0bfdc7137d ("KVM: x86: Advertise AVX512 Bit Matrix Multiply (BMM) to userspace")Signed-off-by Jim Mattson <[email protected]>
Quoted 11 lines · Jim Mattson
Add an explicit dependency between
X86_FEATURE_AVX512_BMMandX86_FEATURE_AVX512Fin the CPUID dependency table.AVX512 Bit Matrix Multiply (BMM) instructions operate on vector registers and require AVX512 Foundation support. Declaring this dependency ensures that if AVX512F is disabled (e.g. via clearcpuid or host capabilities),
AVX512_BMMwill be automatically cleared as well.Fixes de0bfdc7137d ("KVM: x86: Advertise AVX512 Bit Matrix Multiply (BMM) to userspace")Signed-off-by Jim Mattson <[email protected]>---
I assume this will go through the tip tree.