From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT76n-0003WD-1R for qemu-devel@nongnu.org; Wed, 04 Mar 2015 06:05:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT76h-0007Cl-R8 for qemu-devel@nongnu.org; Wed, 04 Mar 2015 06:04:56 -0500 Received: from mail.kernel.org ([198.145.29.136]:34331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT76h-0007CZ-LY for qemu-devel@nongnu.org; Wed, 04 Mar 2015 06:04:51 -0500 Date: Wed, 4 Mar 2015 12:04:44 +0100 From: "Michael S. Tsirkin" Message-ID: <20150304110444.GB27463@redhat.com> References: <1425390913-17726-1-git-send-email-kraxel@redhat.com> <20150303174201.GD21824@redhat.com> <1425466550.8389.10.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425466550.8389.10.camel@nilsson.home.kraxel.org> Subject: Re: [Qemu-devel] [PATCH] virtio-pci: make pci bar layout more flexible. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org, Anthony Liguori On Wed, Mar 04, 2015 at 11:55:50AM +0100, Gerd Hoffmann wrote: > Hi, > > > > VirtIOPCIProxy subclasses which need additional pci bars, such as > > > virtio-vga, just need to make sure they register the additinal bars > > > before initializing virtio-pci, so the superclass can see the registered > > > bars and shuffle around the virtio bars accordingly. > > > > I think I prefer we just DTRT and keep same layouts for everyone by > > default: isn't there a layout that is good for everybody? > > I want bar #2 for the vga framebuffer for virtio-vga. Which conflicts > with bar #2 being used for the modern bar in todays code. OK, and IIUC you are saying that using bar #2 for that is a requirement for vga to work? > We can move the modern bar to #4 for everybody, then we'll have: > > #0 -- legacy i/o > #1 -- msix > #2 -- unused (by virtio) > #3 -- unused (by virtio) > #4 -- modern mem > #5 -- modern mem too (because it's 64bit). > > That'll leave bars #2 + #3 free, for additional bars (1x 64bit or 2x > 32bit) such as vga framebuffer if needed. Yes, that's fine with me. > > I know this means we'll leave BAR0 unused for modern devices but that > > does not seem too bad. > > Yep, no technical reason against it, although it IMHO looks nicer. > > cheers, > Gerd If we run into a problem, we'll be able to reshuffle it all easily. -- MST