x86 CPU model versioning
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 14 repliesIn review
- v16 patches 17 repliesSuperseded
Changes in v2 from the cover letter
* Patch "i386: Infrastructure for versioned CPU models" was rewritten and split in two:
* i386: Register versioned CPU models
* i386: Make unversioned CPU models be aliases
* -IBRS, -noTSX, -IBPB CPU models are now aliases
* Enable rdctl-no, ibrs-all, skip-l1dfl-vmentry in Cascadelake-Server-v2
* New patch added:
* i386: Get model-id from CPU object on "-cpu help"
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | qmp: Add "alias-of" field to query-cpu-definitionsqapi/ | +8 | 1 reply | |
| 2/9 | i386: Add x-force-features option for testingtarget/ target/ | +12 | 1 reply | |
| 3/9 | i386: Get model-id from CPU object on "-cpu help"target/ | +13 | 1 reply | |
| 4/9 | i386: Register versioned CPU modelstarget/ target/ target/ +1 more | +318 | 1 reply | |
| 5/9 | i386: Define -IBRS, -noTSX, -IBRS versions of CPU modelstarget/ | +186 | 2 replies | |
| 6/9 | i386: Replace -noTSX, -IBRS, -IBPB CPU models with aliasestarget/ | +21 | 1 reply | |
| 7/9 | i386: Make unversioned CPU models be aliaseshw/ hw/ hw/ +4 more | +203 | 2 replies | |
| 8/9 | docs: Deprecate CPU model runnability guaranteesqemu-deprecated.texi | +19 | 1 reply | |
| 9/9 | i386: Add Cascadelake-Server-v2 CPU modeltarget/ tests/ | +87 | 4 replies |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Daniel P. Berrangé |
|---|---|
| 1/9 | R-b |
| 2/9 | R-b |
| 3/9 | R-b |
| 4/9 | R-b |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | R-b |
| 8/9 | R-b |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/9] x86 CPU model versioning
Changes v1 -> v2:
* Patch "i386: Infrastructure for versioned CPU models" was rewritten and split in two:
* i386: Register versioned CPU models
* i386: Make unversioned CPU models be aliases
* -IBRS, -noTSX, -IBPB CPU models are now aliases
* Enable rdctl-no, ibrs-all, skip-l1dfl-vmentry in Cascadelake-Server-v2
* New patch added:
* i386: Get model-id from CPU object on "-cpu help"
---
Original description in v1:
This series implements basic infrastructure for CPU model versioning, as discussed before[1][2][3]. This will finally allow us to update CPU models in ways that introduce new software or hardware requirements.
My original plan was to use "query-cpu-model-expansion mode=static" to resolve aliases, but I dropped that plan because it would increase complexity for management software a lot. static CPU models are documented as not being affected by the machine type and accelerator at all, which would make the versioned CPU models very inconvenient to use in the command line. e.g.: users would be forced to replace:
-cpu Haswell
with:
-cpu Haswell-4.1,+2apic,+monitor,+kvmclock,+kvm-nopiodelay,+kvm-asyncpf,+kvm-steal-time,+kvm-pv-eoi,+kvmclock-stable-bit,+x2apic,-acpi,-monitor,-svm
In the end, making the versioned CPU models static is not a requirement at all: what we really need is to drop the runnability guarantees from unversioned CPU model names, and require management software to resolve the unversioned alias before saving the VM configuration.
Guest ABI compatibility and live migration guarantees are going to be kept: unversioned CPU models will still be usable with live migration. Only runnability guarantees when updating the machine type will be dropped. This means unversioned CPU models are still reported as migration-safe in query-cpu-definitions.
The last patch in the series demonstrates how the new feature can be used to update a CPU model: it adds a Cascadelake-Server-4.1.1 CPU model, including "arch-capabilities=on" and "stepping=5". Unfortunately we can't enable arch-capabilities in the -4.1 version of Cascadelake-Server because it would break our existing runnability guarantees.
[1] https://www.mail-archive.com/[email protected]/msg167342.html
[2] https://www.mail-archive.com/[email protected]/msg590034.html
[3] https://www.mail-archive.com/[email protected]/msg611244.html
---
Cc: Paolo Bonzini <[email protected]>
Cc: Pavel Hrdina <[email protected]>
Cc: Jiri Denemark <[email protected]>
Cc: "Hu, Robert" <[email protected]>
Cc: Tao Xu <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: "Daniel P. Berrange" <[email protected]>
Cc: Igor Mammedov <[email protected]>
Eduardo Habkost (9):
qmp: Add "alias-of" field to query-cpu-definitions
i386: Add x-force-features option for testing
i386: Get model-id from CPU object on "-cpu help"
i386: Register versioned CPU models
i386: Define -IBRS, -noTSX, -IBRS versions of CPU models
i386: Replace -noTSX, -IBRS, -IBPB CPU models with aliases
i386: Make unversioned CPU models be aliases
docs: Deprecate CPU model runnability guarantees
i386: Add Cascadelake-Server-v2 CPU model
qapi/target.json | 9 +- include/hw/i386/pc.h | 3 + target/i386/cpu-qom.h | 10 +- target/i386/cpu.h | 28 + hw/i386/pc.c | 3 + hw/i386/pc_piix.c | 4 + hw/i386/pc_q35.c | 4 + target/i386/cpu.c | 1028 +++++++++----------- qemu-deprecated.texi | 19 + tests/acceptance/x86_cpu_model_versions.py | 304 ++++++ 10 files changed, 831 insertions(+), 581 deletions(-) create mode 100644 tests/acceptance/x86_cpu_model_versions.py
Signature · 1 line
2.18.0.rc1.1.g3f1ff2140