[PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline()
Paolo Bonzini
pbonzini at redhat.com
Sat Mar 13 09:28:40 UTC 2021
On 13/03/21 09:41, Markus Armbruster wrote:
> Observation, not objection:
>
> 1. QMP core parses JSON text into QObject, passes to generated
> marshaller.
>
> 2. Marshaller converts QObject to ObjectOptions with the QObject input
> visitor, passes to qmp_object_add().
>
> 3. qmp_object_add() wraps around user_creatable_add_qapi().
>
> 4. user_creatable_add_qapi() converts right back to QObject with the
> QObject output visitor. It splits the result into qom_type, id and
> the rest, and passes all three to user_creatable_add_type().
>
> 5. user_creatable_add_type() performs a virtual visit with the QObject
> input visitor. The outermost object it visits itself, its children
> it visits by calling object_property_set().
>
> I sure hope we wouldn't write it this way from scratch:)
All problems in computer science ca be solved by adding another level of
indirection, except those that can be solved by adding two more levels
of indirection.
> I think your patch is a reasonable step towards a QOM that is at peace
> with QAPI. But there's plenty of work left.
Absolutely, see https://wiki.qemu.org/Features/QOM-QAPI_integration for
some brainstorming about it.
Paolo
More information about the libvir-list
mailing list