All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.