i386: Add `machine` parameter to query-cpu-definitions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 0 repliesNew
- v17 patches 12 repliesSuperseded
Changes in v2 from the cover letter
* Rewrite documentation, with suggestions from Markus
* Try to reduce churn and keep the existing default_cpu_version static variable
* Replace x86_cpu_class_get_alias_of() with x86_cpu_model_resolve_alias()
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | machine: machine_find_class() functionhw/ include/ softmmu/ | +19 | 0 replies | |
| 2/7 | i386: Add X86CPUModel.alias_of fieldtarget/ | +11 | 0 replies | |
| 3/7 | i386: Replace x86_cpu_class_get_alias_of() with x86_cpu_model_resolve_alias()target/ | +17 | 0 replies | |
| 4/7 | i386: Add default_version parameter to CPU version functionstarget/ | +10 | 0 replies | |
| 5/7 | i386: Wrap QMP code in !CONFIG_USER_ONLYtarget/ | +6 | 0 replies | |
| 6/7 | i386: Don't use default_cpu_version inside x86_cpu_definition_entry()target/ | +15 | 0 replies | |
| 7/7 | cpu: Add `machine` parameter to query-cpu-definitionsqapi/ target/ target/ +4 more | +95 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/7] i386: Add `machine` parameter to query-cpu-definitions
Changes v1 -> v2:
* Rewrite documentation, with suggestions from Markus
* Try to reduce churn and keep the existing default_cpu_version static variable
* Replace x86_cpu_class_get_alias_of() with x86_cpu_model_resolve_alias()
Link to v1:
https://lore.kernel.org/qemu-devel/[email protected]
We had introduced versioned CPU models in QEMU 4.1, including a method for querying for CPU model versions using query-cpu-definitions. This solution had one problem: fetching CPU alias information for multiple machine types required restarting QEMU for each machine being queried.
This series adds a new machine parameter to query-cpu-definitions, that can be used to query CPU model alias information for multiple machines without restarting QEMU.
About CPU model versioning vs query-cpu-model-expansion
-------------------------------------------------------
There had been some discussion[1] about using a mechanism for this similar to what's done in s390x, based on query-cpu-model-expansion. I had considered that approach in the beginning, but this would require
query-cpu-model-expansion type=static
to resolve to a useful base CPU model that is static.
Unfortunately, we have no useful static CPU model in x86 yet, except for "base", because of the complex accelerator-dependent rules that affect expansion of CPU models. Maybe in the future we'll be able to define static versions of each CPU model, and unify the CPU model versioning approaches in all architectures.
While we don't have this, we need to work with what we have. What we have today in x86 are CPU models that are not static and not accelerator-independent.
[1] https://lore.kernel.org/qemu-devel/[email protected]/
Eduardo Habkost (7):
machine: machine_find_class() function
i386: Add X86CPUModel.alias_of field
i386: Replace x86_cpu_class_get_alias_of() with
x86_cpu_model_resolve_alias()
i386: Add default_version parameter to CPU version functions
i386: Wrap QMP code in !CONFIG_USER_ONLY
i386: Don't use default_cpu_version inside x86_cpu_definition_entry()
cpu: Add machine parameter to query-cpu-definitions
qapi/machine-target.json | 14 ++- include/hw/boards.h | 2 + hw/core/machine.c | 16 ++++ softmmu/vl.c | 17 +--- target/arm/helper.c | 4 +- target/i386/cpu.c | 105 +++++++++++++++------ target/mips/helper.c | 4 +- target/s390x/cpu_models.c | 4 +- target/ppc/translate_init.c.inc | 4 +- tests/acceptance/x86_cpu_model_versions.py | 48 ++++++++++ 10 files changed, 167 insertions(+), 51 deletions(-)
Signature · 1 line
2.28.0