]> xenbits.xensource.com Git - libvirt.git/commit
qemu_process: Enter QMP command mode when starting QEMU Process
authorChris Venteicher <cventeic@redhat.com>
Thu, 14 Feb 2019 10:25:50 +0000 (11:25 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 19 Feb 2019 17:44:49 +0000 (18:44 +0100)
commit5b13da5ca2f6c2d0d1437466f2df6ab8c08256ea
tree418c5c34a5068775e2c1c31daf9b849d0060a733
parent5724dca13560ff1f5ae012e8ad401602439da2a9
qemu_process: Enter QMP command mode when starting QEMU Process

qemuProcessQMPStart starts a QEMU process and monitor connection that
can be used by multiple functions possibly for multiple QMP commands.

The QMP exchange to exit capabilities negotiation mode and enter command
mode can only be performed once after the monitor connection is
established.

Move responsibility for entering QMP command mode into the
qemuProcessQMP code so multiple functions can issue QMP commands in
arbitrary orders.

This also simplifies the functions using the connection provided by
qemuProcessQMPStart to issue QMP commands.

Test code now needs to call qemuMonitorSetCapabilities to send the
message to switch to command mode because the test code does not use the
qemuProcessQMP command that internally calls qemuMonitorSetCapabilities.

Signed-off-by: Chris Venteicher <cventeic@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_process.c
src/qemu/qemu_processpriv.h
tests/qemucapabilitiestest.c