Skip to content

Commit 47bfd14

Browse files
nikunjadopsiff
authored andcommitted
KVM: x86: Advertise AVX512 Bit Matrix Multiply (BMM) to userspace
Advertise AVX512 Bit Matrix Multiply (BMM) and Bit Reversal instructions to userspace via CPUID leaf 0x80000021_EAX[23]. This feature enables bit matrix multiply operations and bit reversal. While at it, reorder PREFETCHI to match the bit position order in CPUID leaf 0x80000021_EAX for better organization. Signed-off-by: Nikunj A Dadhania <nikunj@amd.com> Link: kvm-x86/linux@de0bfdc7137d Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
1 parent a54af07 commit 47bfd14

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@
488488
#define X86_FEATURE_GP_ON_USER_CPUID (20*32+17) /* User CPUID faulting */
489489

490490
#define X86_FEATURE_PREFETCHI (20*32+20) /* Prefetch Data/Instruction to Cache Level */
491+
#define X86_FEATURE_AVX512_BMM (20*32+23) /* AVX512 Bit Matrix Multiply instructions */
491492
#define X86_FEATURE_SBPB (20*32+27) /* Selective Branch Prediction Barrier */
492493
#define X86_FEATURE_IBPB_BRTYPE (20*32+28) /* MSR_PRED_CMD[IBPB] flushes all branch type predictions */
493494
#define X86_FEATURE_SRSO_NO (20*32+29) /* CPU is not affected by SRSO */

arch/x86/kvm/cpuid.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,11 +1217,12 @@ void kvm_set_cpu_caps(void)
12171217
F(NULL_SEL_CLR_BASE),
12181218
/* UpperAddressIgnore */
12191219
F(AUTOIBRS),
1220-
F(PREFETCHI),
12211220
EMULATED_F(NO_SMM_CTL_MSR),
12221221
/* PrefetchCtlMsr */
12231222
/* GpOnUserCpuid */
12241223
/* EPSF */
1224+
F(PREFETCHI),
1225+
F(AVX512_BMM),
12251226
SYNTHESIZED_F(SBPB),
12261227
SYNTHESIZED_F(IBPB_BRTYPE),
12271228
SYNTHESIZED_F(SRSO_NO),

0 commit comments

Comments
 (0)