]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: command: Use JSON for QAPIfied -object directly
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Mar 2021 14:44:19 +0000 (15:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 23 Mar 2021 13:06:31 +0000 (14:06 +0100)
commit4f33b817b2926198ec626f10c3fca1c8aaececf6
tree85297848ceb62e898873b77ab663cd97e83431ca
parent96850dfe216f99019978a55027a1e763135ae88f
qemu: command: Use JSON for QAPIfied -object directly

Skip the lossy conversion to legacy commandline arguments by using the
JSON props directly when -object is QAPIfied. This avoids issues with
conversion of bitmaps and also allows validation of the generated JSON
against the QMP schema in the tests.

Since the new approach is triggered by a qemu capability the code
from 'virQEMUBuildObjectCommandlineFromJSON' in util/virqemu.c was moved
to 'qemuBuildObjectCommandlineFromJSON' in qemu/qemu_command.c which has
the virQEMUCaps type.

Some functions needed to be modified to propagate qemuCaps.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/qemu/qemu_command.c
src/util/virqemu.c
src/util/virqemu.h