]> xenbits.xensource.com Git - libvirt.git/commit
qemu: capabilities: Don't partially reprope caps on process reconnect
authorPeter Krempa <pkrempa@redhat.com>
Fri, 25 Nov 2016 16:08:25 +0000 (17:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 28 Nov 2016 09:02:36 +0000 (10:02 +0100)
commitb87a11340fb444f669d1a3e2ffb3680490c10134
tree73a71a9d3ab04c967e502718a219b080592b16ac
parenta1adfb0f066149f1aab52613d5e67e8e9da0d489
qemu: capabilities: Don't partially reprope caps on process reconnect

Thanks to the complex capability caching code virQEMUCapsProbeQMP was
never called when we were starting a new qemu VM. On the other hand,
when we are reconnecting to the qemu process we reload the capability
list from the status XML file. This means that the flag preventing the
function being called was not set and thus we partially reprobed some of
the capabilities.

The recent addition of CPU hotplug clears the
QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS if the machine does not support it.
The partial re-probe on reconnect results into attempting to call the
unsupported command and then killing the VM.

Remove the partial reprobe and depend on the stored capabilities. If it
will be necessary to reprobe the capabilities in the future, we should
do a full reprobe rather than this partial one.
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_process.c