[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 29/30] vl: QAPIfy -object
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 29/30] vl: QAPIfy -object |
Date: |
Mon, 8 Mar 2021 13:34:24 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 |
On 3/8/21 10:54 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.
Maybe worth a tweak to this paragraph now that b979c931 has landed
formally deprecating -writeconfig (all the more reason we don't care
about it).
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Acked-by: Peter Krempa <pkrempa@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
R-b stands either way.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [PATCH v3 24/30] qemu-nbd: Use user_creatable_process_cmdline() for --object, (continued)
- [PATCH v3 24/30] qemu-nbd: Use user_creatable_process_cmdline() for --object, Kevin Wolf, 2021/03/08
- [PATCH v3 28/30] qom: Add user_creatable_parse_str(), Kevin Wolf, 2021/03/08
- [PATCH v3 27/30] hmp: QAPIfy object_add, Kevin Wolf, 2021/03/08
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Markus Armbruster, 2021/03/13
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Paolo Bonzini, 2021/03/13
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Markus Armbruster, 2021/03/15
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Kevin Wolf, 2021/03/15
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Dr. David Alan Gilbert, 2021/03/15
- Re: [PATCH v3 27/30] hmp: QAPIfy object_add, Paolo Bonzini, 2021/03/15
[PATCH v3 29/30] vl: QAPIfy -object, Kevin Wolf, 2021/03/08
- Re: [PATCH v3 29/30] vl: QAPIfy -object,
Eric Blake <=
[PATCH v3 16/30] qapi/qom: Add ObjectOptions for input-*, Kevin Wolf, 2021/03/08
[PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline(), Kevin Wolf, 2021/03/08
[PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object, Kevin Wolf, 2021/03/08