[PATCH 0/6] x86: KVM: Expose CPUID to guest for new Intel platform instructions

From: Jiaxi Chen
Date: Wed Oct 19 2022 - 04:52:10 EST


Latest Intel platform Granite Rapids/Sierra Forest has introduced below
new instructions and CPUIDs:

- CMPccXADD CPUID.(EAX=7,ECX=1):EAX[bit 7]
- AMX-FP16 CPUID.(EAX=7,ECX=1):EAX[bit 21]
- AVX-IFMA CPUID.(EAX=7,ECX=1):EAX[bit 23]
- AVX-VNNI-INT8 CPUID.(EAX=7,ECX=1):EDX[bit 4]
- AVX-NE-CONVERT CPUID.(EAX=7,ECX=1):EDX[bit 5]
- PREFETCHITI CPUID.(EAX=7,ECX=1):EDX[bit 14]

Details can be found in recent Intel ISE (Instruction Set
Extensions)[1].

This series enables related CPUID bit in the kernel feature bits and
expose them to KVM guest OS.

[1] Intel ISE: https://cdrdv2.intel.com/v1/dl/getContent/671368

Chang S. Bae (1):
x86: KVM: Enable AMX-FP16 CPUID and expose it to guest

Jiaxi Chen (5):
x86: KVM: Enable CMPccXADD CPUID and expose it to guest
x86: KVM: Enable AVX-IFMA CPUID and expose it to guest
x86: KVM: Enable AVX-VNNI-INT8 CPUID and expose it to guest
x86: KVM: Enable AVX-NE-CONVERT CPUID and expose it to guest
x86: KVM: Enable PREFETCHIT0/1 CPUID and expose it to guest

arch/x86/include/asm/cpufeature.h | 7 +++++--
arch/x86/include/asm/cpufeatures.h | 10 +++++++++-
arch/x86/include/asm/disabled-features.h | 3 ++-
arch/x86/include/asm/required-features.h | 3 ++-
arch/x86/kernel/cpu/common.c | 1 +
arch/x86/kvm/cpuid.c | 8 ++++++--
arch/x86/kvm/reverse_cpuid.h | 1 +
7 files changed, 26 insertions(+), 7 deletions(-)


base-commit: e18d6152ff0f41b7f01f9817372022df04e0d354
--
2.27.0