Note: since I've made some changes to a lot of these patches / split
up some patches, I've decided to hold off on adding any r-b's in case
there is a specific change that someone does not agree with.
Changelog:
- Properly refactored code from CPU model expansion function
- Introduced a cleanup patch for CPU model expansion function
- Introduced patches that modifies the refactored code to suit
needs for baseline/comparison
- CPU expansion function now accepts a virCPUDefPtr
- Removed props parsing from CPU model comparison (they weren't
used)
- Cleaner error reporting when baselining/comparing with erroneous
CPU models / features
- Various cleanups based on feedback
___
To run these patches, execute the virsh hypervisor-cpu-compare or
hypervisor-cpu-baseline commands and pass an XML file describing one or
more CPU definition. You can use the definition from virsh domcapabilities
or from a guest XML. There is no need extract it from the file and place
it a new one, as the XML parser will look specifically for the CPU tags.
___
These patches hookup the virsh hypervisor-cpu-compare/baseline commands
for the s390x architecture. They take an XML file describing some CPU
definitions and passes the data to QEMU, where the actual CPU model
comparison / baseline calculation is handled (available since QEMU 2.8.5).
When baselining CPU models with the --features argument, s390x will report
a full CPU model expansion.
Thanks.
Collin Walling (15):
qemu_monitor: refactor cpu model expansion
qemu_monitor: expansion cleanups
qemu_monitor: use cpu def instead of char for expansion
qemu_monitor: add features to CPU model for QMP command
qemu_monitor: allow cpu props to be optional
qemu_monitor: make qemuMonitorJSONParseCPUModelData command-agnostic
qemu_monitor: implement query-cpu-model-baseline
qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_BASELINE
qemu_driver: hook up query-cpu-model-baseline
qemu_driver: expand cpu features after baseline
qemu_monitor: implement query-cpu-model-comparison
qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON
cpu_conf: xml to cpu definition parse helper
qemu_driver: hook up query-cpu-model-comparison
qemu_driver: improve comparison/baseline error reporting
src/conf/cpu_conf.c | 29 +++
src/conf/cpu_conf.h | 5 +
src/cpu/cpu.c | 14 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 21 +-
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_driver.c | 215 +++++++++++++++++
src/qemu/qemu_monitor.c | 39 +++-
src/qemu/qemu_monitor.h | 13 +-
src/qemu/qemu_monitor_json.c | 279 +++++++++++++++++------
src/qemu/qemu_monitor_json.h | 17 +-
tests/cputest.c | 11 +-
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 2 +
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 +
19 files changed, 573 insertions(+), 89 deletions(-)
--
2.7.4