This PR is to add KVM support for SPR new CPU feature, which include bus_lock_detect,bus lock debug exception, avx_vnni and avx512_fp16.
Test Boot host with kernel that having KVM support for SPR new instructions and launch a guest VM with kernel that also have the support for SPR new instructions.
Then in the guest VM, we can find "bus_lock_detect" "avx_vnni" and "avx512_fp16" in /proc/cpuinfo. And, bus lock debug exception is an ability to notify the kernel by an #DB trap after the instruction acquires a bus lock and is executed when CPL>0. This allows the kernel to enforce user application throttling or mitigations. Existence of bus lock debug exception is enumerated via CPUID.(EAX=7,ECX=0).ECX[24]
Known Issue N/A
Default config change N/A
Arnaldo Carvalho de Melo (1): tools headers UAPI: Sync KVM's kvm.h and vmx.h headers with the kernel sources
Cathy Zhang (1): KVM: x86: Expose AVX512_FP16 for supported CPUID
Chenyi Qiang (5): KVM: X86: Reset the vcpu->run->flags at the beginning of vcpu_run KVM: VMX: Enable bus lock VM exit KVM: X86: Rename DR6_INIT to DR6_ACTIVE_LOW KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit KVM: nVMX: Fix nested bus lock VM exit
Paolo Bonzini (1): KVM: X86: Expose bus lock debug exception to guest
Yang Zhong (1): KVM: Expose AVX_VNNI instruction to guset
arch/x86/include/asm/kvm_host.h | 20 +++++++-- arch/x86/include/asm/vmx.h | 1 + arch/x86/include/asm/vmxfeatures.h | 1 + arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/include/uapi/asm/vmx.h | 4 +- arch/x86/kvm/cpuid.c | 6 +-- arch/x86/kvm/emulate.c | 2 +- arch/x86/kvm/svm/nested.c | 2 +- arch/x86/kvm/svm/svm.c | 6 +-- arch/x86/kvm/vmx/capabilities.h | 9 ++++ arch/x86/kvm/vmx/nested.c | 10 ++++- arch/x86/kvm/vmx/vmx.c | 44 ++++++++++++++++-- arch/x86/kvm/vmx/vmx.h | 2 +- arch/x86/kvm/x86.c | 64 ++++++++++++++++++++------- include/uapi/linux/kvm.h | 5 +++ tools/arch/x86/include/uapi/asm/kvm.h | 1 + tools/arch/x86/include/uapi/asm/vmx.h | 4 +- 17 files changed, 147 insertions(+), 35 deletions(-)