Skip to content

x86: KVM: Expose CPUID to guest for new Intel platform instructions

Jiaxi Chen kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6x86: KVM: Enable CMPccXADD CPUID and expose it to guestarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+2 -18 replies
2/6x86: KVM: Enable AMX-FP16 CPUID and expose it to guestarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+2 -14 replies
3/6x86: KVM: Enable AVX-IFMA CPUID and expose it to guestarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+3 -20 replies
4/6x86: KVM: Enable AVX-VNNI-INT8 CPUID and expose it to guestarch/x86/include/asm/cpufeature.h arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/disabled-features.h +4 more+19 -65 replies
5/6x86: KVM: Enable AVX-NE-CONVERT CPUID and expose it to guestarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+3 -10 replies
6/6x86: KVM: Enable PREFETCHIT0/1 CPUID and expose it to guestarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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

Signature · 1 line
2.27.0