|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree |
Date: | Fri, 16 Dec 2011 07:48:19 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 |
On 12/16/2011 03:42 AM, Kevin Wolf wrote:
Am 15.12.2011 19:10, schrieb Anthony Liguori:On 12/12/2011 02:29 PM, Anthony Liguori wrote:This is a follow up to my previous series to get us started in the QOM direction. A few things are different this time around. Most notably: 1) Devices no longer have names. Instead, path names are always used to identify devices. 2) In order to support (1), dynamic properties are now supported. 3) The concept of a "root device" has been introduced. The root device is roughly modelling the motherboard of a machine. This type is a container type and it's best to think of it as something like a PCB board I guess. See my other mail for a description of my merge plan for QOM.Applied. Regards, Anthony LiguoriSo you pushed this with qdev_property_add_child() calls spread all over the place instead of being treated like other properties? :-(
I would really like to be able to do something like: struct ISASerial { Device parent; UART uart; }; static Properties isa_serial_properties[] = { DEFINE_PROP_CHILD(ISASerial, uart), ... }; Actually, I'd really like to do: struct ISASerial { Device parent; UART _child uart; }; And use an IDL compiler to generate the property table.But at any rate, to get there, we need to first refactor the device model so that child devices are being created and registered in the device init functions. We also need to a bunch more of the qom series so that we can do in-place initialization of objects.
Right now, a lot of things that are "children" are created in deep corners of the machine init often times long before the parent is ever created.
Regards, Anthony Liguori
Kevin
[Prev in Thread] | Current Thread | [Next in Thread] |