qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline()


From: Paolo Bonzini
Subject: Re: [PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline()
Date: Sat, 13 Mar 2021 10:28:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]