[PATCH 08/11] qdev: Base object creation on QDict rather than QemuOpts

Eric Blake eblake at redhat.com
Fri Sep 24 18:53:37 UTC 2021


On Fri, Sep 24, 2021 at 11:04:24AM +0200, Kevin Wolf wrote:
> 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 at redhat.com>
> ---
>  include/hw/qdev-core.h |  8 ++---
>  hw/core/qdev.c         |  5 ++--
>  hw/net/virtio-net.c    |  4 +--
>  hw/vfio/pci.c          |  4 +--
>  softmmu/qdev-monitor.c | 67 +++++++++++++++++++-----------------------
>  5 files changed, 41 insertions(+), 47 deletions(-)
>

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list