qdev: Base object creation on QDict rather than QemuOpts
commitf3558b1b763683bb877f7dd5b282469cdadc65c3
authorKevin Wolf <kwolf@redhat.com>
Fri, 8 Oct 2021 13:34:41 +0000 (8 15:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Oct 2021 14:11:22 +0000 (15 16:11 +0200)
treedee581ad0e79dad1278e280071ccc49fb68b30e9
parent12b2fad7dcc8d08b6a59d1b14caa392ea614c6d9
qdev: Base object creation on QDict rather than QemuOpts

QDicts are both what QMP natively uses and what the keyval parser
produces. Going through QemuOpts isn't useful for either one, so switch
the main device creation function to QDicts. By sharing more code with
the -object/object-add code path, we can even reduce the code size a
bit.

This commit doesn't remove the detour through QemuOpts from any code
path yet, but it allows the following commits to do so.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20211008133442.141332-15-kwolf@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/core/qdev.c
hw/net/virtio-net.c
hw/vfio/pci.c
include/hw/qdev-core.h
include/hw/virtio/virtio-net.h
include/monitor/qdev.h
softmmu/qdev-monitor.c