]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86: KVM: Advertise CPUIDs for new instructions in Clearwater Forest
authorTao Su <tao1.su@linux.intel.com>
Tue, 5 Nov 2024 05:48:25 +0000 (13:48 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Nov 2024 19:40:40 +0000 (14:40 -0500)
commita0423af92cb31e6fc4f53ef9b6e19fdf08ad4395
tree82852ff667b5a5a8b8258fa9aaa5efc0c1502b89
parent35ff7bfb04af6d07af677357a15493ca0fbd739e
x86: KVM: Advertise CPUIDs for new instructions in Clearwater Forest

Latest Intel platform Clearwater Forest has introduced new instructions
enumerated by CPUIDs of SHA512, SM3, SM4 and AVX-VNNI-INT16. Advertise
these CPUIDs to userspace so that guests can query them directly.

SHA512, SM3 and SM4 are on an expected-dense CPUID leaf and some other
bits on this leaf have kernel usages. Considering they have not truly
kernel usages, hide them in /proc/cpuinfo.

These new instructions only operate in xmm, ymm registers and have no new
VMX controls, so there is no additional host enabling required for guests
to use these instructions, i.e. advertising these CPUIDs to userspace is
safe.

Tested-by: Jiaan Lu <jiaan.lu@intel.com>
Tested-by: Xuelian Guo <xuelian.guo@intel.com>
Signed-off-by: Tao Su <tao1.su@linux.intel.com>
Message-ID: <20241105054825.870939-1-tao1.su@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/cpufeatures.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/reverse_cpuid.h