From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpCmb-0001A0-PC for qemu-devel@nongnu.org; Mon, 04 May 2015 05:35:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpCma-0001jk-U4 for qemu-devel@nongnu.org; Mon, 04 May 2015 05:35:25 -0400 Message-ID: <55473D4F.2090901@redhat.com> Date: Mon, 04 May 2015 11:35:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1430335224-6716-1-git-send-email-mdroth@linux.vnet.ibm.com> <1430335224-6716-3-git-send-email-mdroth@linux.vnet.ibm.com> <55422F91.4050504@redhat.com> <20150430230331.11253.37707@loki> <5543E581.9000809@redhat.com> <20150501225407.24247.3106@loki> In-Reply-To: <20150501225407.24247.3106@loki> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH 02/15] qdev: store DeviceState's canonical path to use when unparenting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , aik@ozlabs.ru, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, david@gibson.dropbear.id.au On 02/05/2015 00:54, Michael Roth wrote: >> > >> > What about unparenting children devices in the device's unrealize >> > callback? It sucks that you have to do it manually, but using stale >> > canonical paths isn't the nicest thing either. > That does seems to do the trick. It felt wrong when I first looked at > it because in some cases the children attach themselves to the parent > without making making the parent aware, Can you point to an example? The parent "owns" its property namespace, so it would be wrong for a child to attach itself unbeknownst to the parent. There are a couple cases where an object adds a property to another object, e.g. the rtc-time property of /machine, but in that case the property is a well-known name whose setting is "outsourced" by /machine to the device. Paolo