[PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F

Jim Mattson posted 1 patch 1 week, 2 days ago
arch/x86/kernel/cpu/cpuid-deps.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
Posted by Jim Mattson 1 week, 2 days ago
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
Re: [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
Posted by Sean Christopherson 4 days, 20 hours ago
On Wed, Jul 15, 2026, 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: Sean Christopherson <seanjc@google.com>

I assume this will go through the tip tree.
Re: [PATCH] x86/cpufeatures: Make AVX512_BMM depend on AVX512F
Posted by Nikunj A. Dadhania 1 week, 2 days ago

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>