From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Vnp-00075F-Io for qemu-devel@nongnu.org; Thu, 17 Dec 2015 05:29:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9Vn9-0004Qo-6a for qemu-devel@nongnu.org; Thu, 17 Dec 2015 05:28:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Vn8-0004Mb-LW for qemu-devel@nongnu.org; Thu, 17 Dec 2015 05:28:10 -0500 References: <0209faa3788f57deeb3ce4a197019b095bc2c05f.1450300479.git.alistair.francis@xilinx.com> <5671F2A1.6060005@redhat.com> From: Paolo Bonzini Message-ID: <56728E36.7010807@redhat.com> Date: Thu, 17 Dec 2015 11:28:06 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , QEMU Developers , Alistair Francis On 17/12/2015 09:26, Peter Maydell wrote: >> > In any case, I would prefer qdev_bus_rename to stay in xlnx-zynqmp.c. > I disagree that it should be in xlnx-zynqmp.c. Either > (a) qdev already provides some reasonable mechanism for > SoC container like this to allow their users to get at > buses provided by their child objects, in which case we > should use it > (b) qdev doesn't provide such a mechanism, in which case > we need to provide one (either qdev_bus_rename or something > else if you have a better idea) > > But we definitely shouldn't have the SoC container code > messing around with the internals of the qdev objects. It's a hack and I don't want it to become a sanctioned way to do it. It's already messing around pretty heavily with qdev internals, see the line right after QLIST_INSERT_HEAD: QLIST_INSERT_HEAD(&dev->child_bus, spi_bus, sibling); Paolo