From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeXoQ-0000fM-Ds for qemu-devel@nongnu.org; Thu, 07 Nov 2013 17:12:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeXoK-0007LD-Dm for qemu-devel@nongnu.org; Thu, 07 Nov 2013 17:12:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeXoK-0007L2-4g for qemu-devel@nongnu.org; Thu, 07 Nov 2013 17:12:20 -0500 Message-ID: <1383862163.2527.83.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Fri, 08 Nov 2013 00:09:23 +0200 In-Reply-To: <527C0AB8.7080105@redhat.com> References: <1383511723-11228-1-git-send-email-marcel.a@redhat.com> <527C023F.2060506@redhat.com> <1383859470.2527.64.camel@localhost.localdomain> <527C0AB8.7080105@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] exec: fix regression by making system-memory region UINT64_MAX size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Peter Maydell , "Michael S. Tsirkin" , Jan Kiszka , "edk2-devel@lists.sourceforge.net" , qemu-devel , Anthony Liguori , Paolo Bonzini , Jordan Justen , afaerber , rth@twiddle.net On Thu, 2013-11-07 at 22:48 +0100, Laszlo Ersek wrote: > On 11/07/13 22:24, Marcel Apfelbaum wrote: > > On Thu, 2013-11-07 at 22:12 +0100, Laszlo Ersek wrote: > > >> adding subregion 'pci-hole' to region 'system' at offset 60000000 > >> warning: subregion collision 60000000/a0000000 (pci-hole) vs ffe00000/200000 (system.flash) > > Thank you Laszlo for the detailed info! > > I think the problem is right above. Why pci-hole and system.flash collide? > > IMHO we should not play with priorities here, better solve the collision. > > pc_init1() > pc_memory_init() > pc_system_firmware_init() > pc_system_flash_init() <---- sets base address to > 0x100000000ULL - flash_size > pflash_cfi01_register() > sysbus_mmio_map() > sysbus_mmio_map_common() > memory_region_add_subregion() > i440fx_init() > memory_region_init_alias("pci-hole") > > pc_init1() passes > > 0x100000000ULL - below_4g_mem_size > > to i440fx_init() as "pci_hole_size", which is then used as the size of > the "pci-hole" alias. > > We should probably subtract the size of the flash from this, but I don't > know how to do that "elegantly". Yet another (output) parameter for > pc_memory_init()? Blech. > > Or look up the end address of "system.flash" by name? Both seems ugly to me... As Peter Maydell pointed out, the pci-hole belongs to the pc model, so we can actually change its priority without affecting other architectures. > > Thanks > Laszlo >