[Top][All Lists]

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

Re: [RFC PATCH 00/12] QOM/QAPI integration part 1

From: Paolo Bonzini
Subject: Re: [RFC PATCH 00/12] QOM/QAPI integration part 1
Date: Wed, 3 Nov 2021 22:26:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 11/3/21 18:29, Kevin Wolf wrote:
This series adds QOM class definitions to the QAPI schema, introduces
a new TypeInfo.instance_config() callback that configures the object at
creation time (instead of setting properties individually) and is
separate from runtime property setters (which often used to be not
really tested for runtime use), and finally generates a marshalling
function for .instance_config() from the QAPI schema that makes this a
natural C interface rather than a visitor based one.

That's pretty cool!

Just one question: why not always use boxed configuration? It should not make the instance_config types any larger, and it avoids unwieldy argument lists.

Also, for the obligatory bikeshedding remark, do you have any other plans or ideas for the colon-separated auto generated typenames? Having both the "namespace" (qom) and the more specific use (config) before the classname is a bit weird, compared to the existing structs like RngRandomProperties. Especially if boxed config is more used (or becomes the only possibility), it might be that qom:class-name:config, or even just class-name:config, make for nicer code in the object implementation.


reply via email to

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