The QEMU monitor commmand query-cpus is deprecated starting
with QEMU 2.12.0 because it can adversely affect the performance of
a running virtual machine.
This series enables libvirt to use the new query-cpus-fast interface
if supported by the local QEMU instance and is required in order
to support QEMU once the interface has been removed.
query-cpus-fast doesn't return the halted state for a virtual CPU,
meaning that the vcpu.<n>.halted value won't be reported with
'virsh domstats' anymore. This is OK, as stats values are not
guaranteed to be reported under all circumstances and on all
architectures.
Upstream discussion consensus was that the halted state was
problematic anyway, as it had different semantics per architecture.
The only known exploitation happened for s390, for this architecture
the halted state will be computed based on an architecture-specific
cpu value returned in query-cpus-fast.
Viktor Mihajlovski (6):
qemu: add capability detection for query-cpus-fast
qemu: use query-cpus-fast in JSON monitor
tests: add qemumonitorjson tests for query-cpus-fast
qemu: add architecture-specific CPU info handling
tests: add testcase for s390 query-cpus-fast
qemu: refresh vcpu halted state only via query-cpus-fast
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_domain.c | 9 +-
src/qemu/qemu_monitor.c | 14 +-
src/qemu/qemu_monitor_json.c | 149 +++++++++++++++++++--
src/qemu/qemu_monitor_json.h | 3 +-
.../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data | 8 ++
.../qemumonitorjson-cpuinfo-s390-fast-cpus.json | 21 +++
.../qemumonitorjson-cpuinfo-s390-fast-hotplug.json | 21 +++
.../qemumonitorjson-cpuinfo-s390-fast.data | 19 +++
...emumonitorjson-cpuinfo-x86-basic-pluggable.data | 5 +
...qemumonitorjson-cpuinfo-x86-full-fast-cpus.json | 71 ++++++++++
...umonitorjson-cpuinfo-x86-full-fast-hotplug.json | 115 ++++++++++++++++
.../qemumonitorjson-cpuinfo-x86-full-fast.data | 109 +++++++++++++++
.../qemumonitorjson-cpuinfo-x86-node-full.data | 2 +
tests/qemumonitorjsontest.c | 121 +++++++++++++----
tests/qemumonitortestutils.c | 6 +
tests/qemumonitortestutils.h | 1 +
18 files changed, 637 insertions(+), 42 deletions(-)
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast.data
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json
create mode 100644
tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data
--
1.9.1