A small but important patch that looks like it will be merged for the upcoming Linux 7.1 kernel is for enumerating AVX-512 BMM support for KVM virtualized guests. AVX-512 BMM is one of the exciting ISA additions with next-gen AMD Zen 6 processors.
Last year AMD sent out the Zen 6 ISA patch for GNU Binutils that confirmed the new ISA capabilities. The most notable ISA addition with Zen 6 is the new AVX-512 BMM bit manipulation instructions for matrix multiply and bit reversal. AVX-512 BMM with Zen 6 was reaffirmed by the Znver6 GCC patch and LLVM/Clang Znver6 patch on the compiler side.
For Linux 7.1, the KVM x86 code is adding the few bits for properly advertising AVX-512 BMM support to guest VMs. Like with existing Advanced Vector Extensions instructions, KVM doesn’t need to have any interaction beyond that but just communicating the necessary feature bits so that guest VMs will be aware of the AVX-512 BMM presence.
“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. Like most AVX instructions, there are no intercept controls for individual instructions, and no extra work is needed in KVM to enable correct execution of the instructions in the guest.”
The patch was recently queued into kvm-x86 and thus look for it being submitted as part of the broader KVM changes when the Linux 7.1 merge window kicks off later this month.
