From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlJME-0001tr-1A for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:11:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlJM9-00024Y-0p for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:11:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlJM8-00024P-NB for qemu-devel@nongnu.org; Tue, 26 Nov 2013 09:11:12 -0500 Message-ID: <5294ABF5.4090405@redhat.com> Date: Tue, 26 Nov 2013 15:11:01 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1384775449-6693-1-git-send-email-mst@redhat.com> <1384775449-6693-2-git-send-email-mst@redhat.com> <52945802.2010309@redhat.com> <20131126091014.GA18777@redhat.com> In-Reply-To: <20131126091014.GA18777@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL for-1.8 1/2] pc: disable pci-info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Eduardo Habkost , "Jordan Justen (Intel address)" , qemu-devel@nongnu.org, Gerd Hoffmann , Anthony Liguori , Igor Mammedov On 11/26/13 10:10, Michael S. Tsirkin wrote: > seabios manages to enumerate PCI with information exported from qemu > so why can't OVMF? SeaBIOS and qemu duplicate logic (code) between each other. src/fw/pciinit.c grabs RamSize over fw_cfg, and i440fx_mem_addr_setup() sets "pcimem_start" to one of three values based on RamSize. (One of the three is not explicit there, it's the build default 0xe0000000.) The same code is visible in qemu in i440fx_init(). I duplicated the same logic in OVMF's PEI one week ago, and it solved the problem. See the patch attached to . But code/logic duplication is ugly, which is why I've been looking for a better, dynamic solution ever since. > I think it's down to other qemu bugs (such as _CRS not covering > all of PCI memory), we shall just fix them. I don't know how to fix them. I don't know how to enumerate all PCI regions in use, plus all unassigned ranges, from below, like with a MemoryListener. If I understand correctly, Igor suggested to track devices as they map their regions, but (again, if I understood correctly) you didn't seem to like the idea. Thanks Laszlo