From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUbx6-0001pO-Ba for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:36:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUbwj-0007S1-MP for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:36:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUbwj-0007QC-At for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:35:57 -0400 Message-ID: <1381494950.23065.12.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Fri, 11 Oct 2013 14:35:50 +0200 In-Reply-To: <1381486765-27389-1-git-send-email-imammedo@redhat.com> References: <1381486765-27389-1-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] map 64-bit PCI BARs at location provided by emulator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: pbonzini@redhat.com, kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org, mst@redhat.com On Fr, 2013-10-11 at 12:19 +0200, Igor Mammedov wrote: > Currently 64-bit PCI BARs are unconditionally mapped by BIOS right > over 4G + RamSizeOver4G location, which doesn't allow to reserve > extra space before 64-bit PCI window. For memory hotplug an extra > RAM space might be reserved after present 64-bit RAM end and BIOS > should map 64-bit PCI BARs after it. > > Introduce "etc/pcimem64-start" romfile to provide BIOS a hint > where it should start mapping of 64-bit PCI BARs. If romfile is > missing BIOS reverts to legacy behavior and starts mapping right > after high memory. Looks good overall. > struct pci_region r64_mem, r64_pref; > + u64 base64 = le64_to_cpu(romfile_loadint("etc/pcimem64-start", > + 0x100000000ULL + RamSizeOver4G)); Should we sanity-check base64 maybe? Make sure it isn't smaller than 0x100000000ULL + RamSizeOver4G? cheers, Gerd