From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGCbH-0004ke-Ia for qemu-devel@nongnu.org; Mon, 15 Jun 2009 09:51:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGCbC-0004iA-PQ for qemu-devel@nongnu.org; Mon, 15 Jun 2009 09:51:50 -0400 Received: from [199.232.76.173] (port=51915 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGCbC-0004i0-Fm for qemu-devel@nongnu.org; Mon, 15 Jun 2009 09:51:46 -0400 Received: from mail-qy0-f191.google.com ([209.85.221.191]:42715) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGCbC-0000TW-48 for qemu-devel@nongnu.org; Mon, 15 Jun 2009 09:51:46 -0400 Received: by qyk29 with SMTP id 29so4573027qyk.4 for ; Mon, 15 Jun 2009 06:51:42 -0700 (PDT) Message-ID: <4A3651EB.3070204@codemonkey.ws> Date: Mon, 15 Jun 2009 08:51:39 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities] References: <1244821292.30522.56.camel@blaa> <4A327E4A.7010300@codemonkey.ws> <1244825303.26769.19.camel@blaa> <20090614095016.GA7560@redhat.com> <1245056916.6891.31.camel@blaa> <4A3613EC.6030608@redhat.com> <20090615103249.GB6351@redhat.com> <4A363012.8050409@redhat.com> <20090615114858.GG6351@redhat.com> <4A3636FA.1040609@redhat.com> <20090615124101.GH6351@redhat.com> <4A364381.401@redhat.com> <4A364401.6010500@codemonkey.ws> <4A3647FB.9010808@redhat.com> <4A364B53.9080007@codemonkey.ws> <4A364FE0.40204@redhat.com> In-Reply-To: <4A364FE0.40204@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Carsten Otte , Rusty Russell , kvm@vger.kernel.org, Mark McLoughlin , Glauber Costa , "Michael S. Tsirkin" , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, Blue Swirl , Christian Borntraeger , Paul Brook Avi Kivity wrote: > On 06/15/2009 04:23 PM, Anthony Liguori wrote: > > How would qemu know which slots to optimize for? > > In practice, I don't see that as a real problem. We should (a) add an > ioapic and four more pci links (b) recommend that slots be assigned in > ascending order, and everything works. > > I don't see your concern about libvirt allocating slots. If a human > can plug a card into a slot, so can libvirt. Doing an interactive > back-and-forth (equivalent to plugging a card while blindfolded, then > looking to see which slot we hit) is certainly more difficult. Let's take a concrete example because I think you missed my point. For the r2d board, if you have 1 on-board NIC, it has to go in slot 2. Additional NICs can go in any slot, but the primary on-board NIC is expected to live in slot 2. It's possible to not have that on-board NIC. If you let QEMU allocate which PCI slot a device goes in, we can hide this detail from libvirt. If you have libvirt do PCI slot allocation by default, it has to know about this restriction in the r2d board unless you have a clever way to express this sort of information. Once QEMU has allocated a device to a slot, libvirt can do a good job maintaining that relationship. Regards, Anthony Liguori