[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 30/31] vl: QAPIfy -object
From: |
Eric Blake |
Subject: |
Re: [PATCH v2 30/31] vl: QAPIfy -object |
Date: |
Fri, 26 Feb 2021 16:40:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/24/21 7:52 AM, Kevin Wolf wrote:
> This switches the system emulator from a QemuOpts-based parser for
> -object to user_creatable_parse_str() which uses a keyval parser and
> enforces the QAPI schema.
>
> Apart from being a cleanup, this makes non-scalar properties accessible.
>
> This adopts a similar model as -blockdev uses: When parsing the option,
> create the ObjectOptions and queue them. At the later point where we
> used to create objects for the collected QemuOpts, the ObjectOptions
> queue is processed instead.
>
> A complication compared to -blockdev is that object definitions are
> supported in -readconfig and -writeconfig.
>
> After this patch, -readconfig still works, though it still goes through
> the QemuOpts parser, which means that improvements like non-scalar
> properties are still not available in config files.
>
> -writeconfig stops working for -object. Tough luck. It has never
> supported all options (not even the common ones), so supporting one less
> isn't the end of the world. As object definitions from -readconfig still
> go through QemuOpts, they are still included in -writeconfig output,
> which at least prevents destroying your existing configuration when you
> just wanted to add another option.
And Paolo has submitted a patch deprecating it.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> softmmu/vl.c | 109 +++++++++++++++++++++++++++++++++++++++------------
> 1 file changed, 84 insertions(+), 25 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- Re: [PATCH v2 29/31] qom: Add user_creatable_parse_str(), (continued)
- [PATCH v2 24/31] qemu-io: Use user_creatable_process_cmdline() for --object, Kevin Wolf, 2021/02/24
- [PATCH v2 27/31] qom: Add user_creatable_add_from_str(), Kevin Wolf, 2021/02/24
- [PATCH v2 26/31] qemu-nbd: Use user_creatable_process_cmdline() for --object, Kevin Wolf, 2021/02/24
- [PATCH v2 31/31] qom: Drop QemuOpts based interfaces, Kevin Wolf, 2021/02/24
- [PATCH v2 30/31] vl: QAPIfy -object, Kevin Wolf, 2021/02/24
- Re: [PATCH v2 30/31] vl: QAPIfy -object,
Eric Blake <=
- Re: [PATCH v2 00/31] qapi/qom: QAPIfy --object and object-add, Peter Krempa, 2021/02/24