* [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
@ 2026-07-15 22:40 Jim Mattson
2026-07-15 22:56 ` sashiko-bot
2026-07-16 8:08 ` Nikunj A. Dadhania
0 siblings, 2 replies; 3+ messages in thread
From: Jim Mattson @ 2026-07-15 22:40 UTC (permalink / raw)
To: x86, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
Cc: Yosry Ahmed, Nikunj A Dadhania, Sean Christopherson,
H . Peter Anvin, linux-kernel, kvm, Jim Mattson
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.
Fixes: de0bfdc7137d ("KVM: x86: Advertise AVX512 Bit Matrix Multiply (BMM) to userspace")
Signed-off-by: Jim Mattson <jmattson@google.com>
---
arch/x86/kernel/cpu/cpuid-deps.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
index 99801e844b30..e9fdf944633b 100644
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -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 },
--
2.55.0.141.g00534a21ce-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
2026-07-15 22:40 [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F Jim Mattson
@ 2026-07-15 22:56 ` sashiko-bot
2026-07-16 8:08 ` Nikunj A. Dadhania
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-15 22:56 UTC (permalink / raw)
To: Jim Mattson; +Cc: kvm
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 <jmattson@google.com>
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.
> diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
> index 146f6f8b0650b..e2e3d0a3abcd5 100644
> --- a/arch/x86/kernel/cpu/cpuid-deps.c
> +++ b/arch/x86/kernel/cpu/cpuid-deps.c
> @@ -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.
> { X86_FEATURE_ENQCMD, X86_FEATURE_XSAVES },
> { X86_FEATURE_PER_THREAD_MBA, X86_FEATURE_MBA },
> { X86_FEATURE_SGX_LC, X86_FEATURE_SGX },
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260715224030.3772948-1-jmattson@google.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
2026-07-15 22:40 [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F Jim Mattson
2026-07-15 22:56 ` sashiko-bot
@ 2026-07-16 8:08 ` Nikunj A. Dadhania
1 sibling, 0 replies; 3+ messages in thread
From: Nikunj A. Dadhania @ 2026-07-16 8:08 UTC (permalink / raw)
To: Jim Mattson, x86, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen
Cc: Yosry Ahmed, Sean Christopherson, H . Peter Anvin, linux-kernel,
kvm
On 7/16/2026 4:10 AM, Jim Mattson wrote:
> 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.
>
> Fixes: de0bfdc7137d ("KVM: x86: Advertise AVX512 Bit Matrix Multiply (BMM) to userspace")
> Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Nikunj A Dadhania <nikunj@amd.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-16 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 22:40 [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F Jim Mattson
2026-07-15 22:56 ` sashiko-bot
2026-07-16 8:08 ` Nikunj A. Dadhania
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox