From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXUsw-0005vY-L8 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 08:44:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXUso-0001mf-MB for qemu-devel@nongnu.org; Fri, 26 Sep 2014 08:44:30 -0400 Message-ID: <54255F9B.40800@redhat.com> Date: Fri, 26 Sep 2014 14:44:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411572143-40345-1-git-send-email-agraf@suse.de> <1411572143-40345-6-git-send-email-agraf@suse.de> <54255698.8070709@redhat.com> <54255B8E.7020500@suse.de> In-Reply-To: <54255B8E.7020500@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , qemu-ppc@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, eric.auger@linaro.org, qemu-devel@nongnu.org, sean.stalley@intel.com, afaerber@suse.de Il 26/09/2014 14:26, Alexander Graf ha scritto: > > Are you sure? Imagine one sysbus device includes another. We only want > to look at the region the lowest sysbus device exposes, no? IIUC this function is used to build the device tree. Say you have 2 consecutive memory regions and the device tree requires separate "reg" entries for them. But because they are consecutive (or perhaps because you have a PCI version of the same device that sticks them in a single BAR) you use a single MMIO area at the sysbus level. In that case, you will use platform_bus_get_mmio_addr on the two inner regions, not the outer one. BTW, I think you will never have one sysbus device including another. The contained device would be busless (similar to the "naked" 8250 device in hw/char/serial.c, except perhaps QOMified). Paolo