From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ0CO-0003gi-NX for qemu-devel@nongnu.org; Fri, 09 Dec 2011 08:09:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RZ0CK-0004uW-GM for qemu-devel@nongnu.org; Fri, 09 Dec 2011 08:09:12 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:48835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ0CK-0004ty-Cm for qemu-devel@nongnu.org; Fri, 09 Dec 2011 08:09:08 -0500 Received: from /spool/local by e6.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Dec 2011 08:09:03 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pB9D8u3Q213258 for ; Fri, 9 Dec 2011 08:08:57 -0500 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pB9D8qmT003219 for ; Fri, 9 Dec 2011 06:08:52 -0700 Message-ID: <4EE2085F.2060604@us.ibm.com> Date: Fri, 09 Dec 2011 07:08:47 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1322857256-14951-1-git-send-email-aliguori@us.ibm.com> <1322857256-14951-16-git-send-email-aliguori@us.ibm.com> <4EE1F052.1020703@redhat.com> In-Reply-To: <4EE1F052.1020703@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date 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 , Gerd Hoffman , Markus Armbruster On 12/09/2011 05:26 AM, Kevin Wolf wrote: > Am 02.12.2011 21:20, schrieb Anthony Liguori: >> This really shows the power of dynamic object properties compared to qdev >> static properties. >> >> This property represents a complex structure who's format is preserved over the >> wire. This is enabled by visitors. >> >> It also shows an entirely synthetic property that is not tied to device state. >> >> Signed-off-by: Anthony Liguori > > There's one thing that I was hoping to find answered when I would have > reviewed the whole series, but it hasn't happened: There is no doubt > that dynamic properties (in the sense of being able to modify them after > constructions) are a useful thing. But you also claim that class-based > properties are not enough for QOM and that we need object-based ones, > which is a requirement not immediately obvious to me. > > Can you provide some examples where we would explicitly need > object-based properties? Sure. Any property that's dynamic needs to be object based. A good example would be PCI slots. Today, we unconditionally advertise 32 slots in our ACPI tables. It could be desirable to eventually make this configurable. So you can imagine where you would have an 'slot-count' property and if that was set to 16, it would result in 'slot[0]..slot[15]' being created. There are other good examples too. Regards, Anthony Liguori > > Kevin >