x86: KVM: Advertise CPUID of new Intel platform instructions to user space
Status from this message: Queued, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest8 patches 1 replyApplied
- v46 patches 16 repliesSuperseded
- v37 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 8 patches | 3 replies | Superseded |
Changes in v5 from the cover letter
- Modify some inaccurate descriptions in the changelogs.
- Address some naming-confusing problems for adding KVM-only leaves, including renaming function and adding comments.
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | KVM: x86: Add BUILD_BUG_ON() to detect bad usage of "scattered" flagsarch/ | +7 | 0 replies | |
| 2/8 | KVM: x86: Update KVM-only leaf handling to allow for 100% KVM-only leafsarch/ arch/ | +19 | 0 replies | |
| 3/8 | x86: KVM: Advertise CMPccXADD CPUID to user spacearch/ arch/ | +2 | 0 replies | |
| 4/8 | x86: KVM: Advertise AMX-FP16 CPUID to user spacearch/ arch/ | +2 | 0 replies | |
| 5/8 | x86: KVM: Advertise AVX-IFMA CPUID to user spacearch/ arch/ | +3 | 0 replies | |
| 6/8 | KVM: x86: Advertise AVX-VNNI-INT8 CPUID to user spacearch/ arch/ | +10 | 0 replies | |
| 7/8 | KVM: x86: Advertise AVX-NE-CONVERT CPUID to user spacearch/ arch/ | +2 | 0 replies | |
| 8/8 | KVM: x86: Advertise PREFETCHIT0/1 CPUID to user spacearch/ arch/ | +2 | 0 replies |
Reviews trailers per patch
3 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Borislav Petkov |
|---|---|
| 1/8 | |
| 2/8 | |
| 3/8 | A-b |
| 4/8 | A-b |
| 5/8 | A-b |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/8] x86: KVM: Advertise CPUID of new Intel platform instructions to user space
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].
These features bits are on two CPUID leafs: CPUID_7_1_EAX and CPUID_7_1_EDX. CPUID_7_1_EAX is an expected-dense leaf and some of its bits have kernel usages, therefore give bits on this leaf an X86_FEATURE definition in kernel. However, CPUID_7_1_EDX is dense and none of its bits have truly kernel usages for the moment. Given that, move CPUID_7_1_EDX to be a KVM-only leaf and plus an x86_FEATURE definition for bits on this leaf to direct them to the KVM entry.
This patch series advertises KVM support of these CPUIDs to host userspace. For all of these features, there are no new VMX controls or additional host enabling required for guests to use them.
[1] Intel ISE: https://cdrdv2.intel.com/v1/dl/getContent/671368
v5:
- Modify some inaccurate descriptions in the changelogs.
- Address some naming-confusing problems for adding KVM-only leaves, including renaming function and adding comments.
v4:
https://lore.kernel.org/kvm/[email protected]/
- Put CPUID_7_1_EAX back to cpuid_leaf[], considering more bits will be defined in the future for this leaf.
v3:
https://lore.kernel.org/kvm/[email protected]/
- Remain CPUID_8000_001F_EAX in the last leaf of cpuid_leaf[]
- Replace CPUID_7_1_EAX with CPUID_LNX_5, waiting for future new CPUIDs
v2:
https://lore.kernel.org/kvm/[email protected]/
- Remove vague descriptions in the changelogs, including pronouns and "this patch" kind of things.
- Move the two CPUIDs of cpuid_leaf[12] CPUID_7_1_EAX to KVM-only subleaves.
- Replace cpuid_leaf[12] CPUID_7_1_EAX with the last leaf CPUID_8000_001F_EAX to shorten array length.
- Change the newly-added CPUID leaf [CPUID_7_1_EDX] in v1 into KVM-only subleaves.
v1:
https://lore.kernel.org/kvm/[email protected]/
Chang S. Bae (1):
x86: KVM: Advertise AMX-FP16 CPUID to user space
Jiaxi Chen (5):
x86: KVM: Advertise CMPccXADD CPUID to user space
x86: KVM: Advertise AVX-IFMA CPUID to user space
KVM: x86: Advertise AVX-VNNI-INT8 CPUID to user space
KVM: x86: Advertise AVX-NE-CONVERT CPUID to user space
KVM: x86: Advertise PREFETCHIT0/1 CPUID to user space
Sean Christopherson (2):
KVM: x86: Add BUILD_BUG_ON() to detect bad usage of "scattered" flags
KVM: x86: Update KVM-only leaf handling to allow for 100% KVM-only
leafs
arch/x86/include/asm/cpufeatures.h | 3 +++ arch/x86/kvm/cpuid.c | 25 ++++++++++++++++++------- arch/x86/kvm/reverse_cpuid.h | 25 ++++++++++++++++++++++--- 3 files changed, 43 insertions(+), 10 deletions(-)
base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa
Signature · 1 line
2.27.0