From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbZCo-0003FO-Fq for qemu-devel@nongnu.org; Fri, 16 Dec 2011 09:56:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbZCm-0005VE-IE for qemu-devel@nongnu.org; Fri, 16 Dec 2011 09:56:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbZCm-0005V4-7c for qemu-devel@nongnu.org; Fri, 16 Dec 2011 09:56:12 -0500 Message-ID: <4EEB5C04.6070504@redhat.com> Date: Fri, 16 Dec 2011 15:56:04 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1323721784-704-1-git-send-email-aliguori@us.ibm.com> <4EEA3813.80006@us.ibm.com> <4EEB1277.4070803@redhat.com> <4EEB1ABB.50204@redhat.com> <4EEB1F3B.8070302@redhat.com> <4EEB3891.2020003@redhat.com> <4EEB4CD1.7050701@us.ibm.com> <4EEB5337.1060800@redhat.com> <4EEB5BB3.4030105@codemonkey.ws> In-Reply-To: <4EEB5BB3.4030105@codemonkey.ws> 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: Anthony Liguori Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Markus Armbruster On 12/16/2011 03:54 PM, Anthony Liguori wrote: > > Yes. I'm not terribly sure how this would work yet. A link and a child > property both acquire references to a device and release a reference to > a device at destruction time. > > For a child property, the reference held by the parent is the only > reference in existing. For non-child properties, the 'peripheral' > container also holds a reference (since you want to be able to assign > the device somewhere else in the device model). > > I'm not sure tying life cycles for a user created device makes sense. > If a user creates a device, IMO, the user should be the one to destroy > the device. I agree. Paolo