From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVh4f-00064g-3X for qemu-devel@nongnu.org; Mon, 14 Oct 2013 08:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VVh4Z-0001ze-3N for qemu-devel@nongnu.org; Mon, 14 Oct 2013 08:16:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VVh4Y-0001zX-QP for qemu-devel@nongnu.org; Mon, 14 Oct 2013 08:16:31 -0400 Message-ID: <1381752983.30262.32.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 14 Oct 2013 14:16:23 +0200 In-Reply-To: <20131014110012.GE30954@redhat.com> References: <1381666424-25250-1-git-send-email-imammedo@redhat.com> <20131013123123.GA10887@redhat.com> <20131013171154.1abb4542@thinkpad> <20131013155920.GC11448@redhat.com> <20131013182328.1e735051@thinkpad> <20131013164609.GA11934@redhat.com> <20131013193319.54578867@thinkpad> <20131013202847.GB12354@redhat.com> <20131014122726.7277bac0@nial.usersys.redhat.com> <20131014110012.GE30954@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] map 64-bit PCI BARs at location provided by emulator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Igor Mammedov , kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org, pbonzini@redhat.com Hi, > > And there is slight difference between PCI holes and PCI address space mappings > > represented by MemoryRegion-s in QEMU. > > > > Basically we only need to inform BIOS where to PCI address spaces start and > > simple "etc/pcimem64-start" + "etc/pcimem32-start" are just fine for that. > > And for now (memory hotplug) we need only the first one, the second one is > > very well hardcoded in Seabios/QEMU. Yes, 32bit hole is basically the [ end-of-memory -> ioapic ] range. Can't see any reason to make that configurable, it is quite unlikely that this ever changes. For the 64bit window it makes sense to configure it, to give qemu a little more control about the address space layout. > Hmm okay but the only reason we want to control this is > because it conflicts with memory hotplug, no? > I vaguely recall we discussed just passing amount of > hot-pluggable memory in, in the past, but I don't > remember the reason we decided against it. > Could you refresh my memory? To me it makes more sense to just go the direct route and say "please put the 64bit bars at this location" rather than indirect "we might want hotplug $thatmuch memory" and then expect the bios to leave that much room. If we ever want reserve more address space for other reasons it'll be easier with the direct variant as the bios doesn't need to be aware that we'll need some address space for $newfeature too. > > A more flexible approach would be a separate table (like e820 table, but only > > for PCI ranges), but it seems a bit of overkill for now (I can't picture > > a need for more than 2 PCI address space mappings). > > It's not unthinkable. > Multiple ECAM regions (for multi-root systems) can make holes in the address space. Sounds pretty theoretic ... > Also, we just ignore everything above the ioapic, but that's > not a must, we could maybe use address space above ioapic. Any reason why we should that? cheers, Gerd