From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbY9G-0006Wl-CE for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:48:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbY9C-0000ef-BG for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:48:30 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:36797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbY9C-0000eR-8X for qemu-devel@nongnu.org; Fri, 16 Dec 2011 08:48:26 -0500 Received: from /spool/local by e5.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Dec 2011 08:48:24 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBGDmMBv286380 for ; Fri, 16 Dec 2011 08:48:22 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBGDmM32013180 for ; Fri, 16 Dec 2011 08:48:22 -0500 Message-ID: <4EEB4C23.6030904@us.ibm.com> Date: Fri, 16 Dec 2011 07:48:19 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323721784-704-1-git-send-email-aliguori@us.ibm.com> <4EEA3813.80006@us.ibm.com> <4EEB1277.4070803@redhat.com> In-Reply-To: <4EEB1277.4070803@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 00/20] qom: dynamic properties and composition tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Markus Armbruster 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 Liguori > > So 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 >