Received: from eggs.gnu.org ([140.186.70.92]:44974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkvg-0001EE-00 for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:19:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdkvd-0007bI-MB for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:19:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdkvd-0007bC-7g for qemu-devel@nongnu.org; Mon, 04 Jul 2011 11:19:17 -0400 From: Markus Armbruster References: <1309519646-3206-1-git-send-email-kraxel@redhat.com> <4E0DBB48.30208@codemonkey.ws> Date: Mon, 04 Jul 2011 17:19:11 +0200 In-Reply-To: <4E0DBB48.30208@codemonkey.ws> (Anthony Liguori's message of "Fri, 01 Jul 2011 07:19:20 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] PCI: how handle multifunction / compound devices best? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Gerd Hoffmann , qemu-devel@nongnu.org Anthony Liguori writes: > On 07/01/2011 06:27 AM, Gerd Hoffmann wrote: >> Hi folks, >> >> I'm still looking for a sane way to handle multifunction pci devices, >> specifically a EHCI USB controller with UHCI companion controllers. >> >> Here comes a small (incomplete[1]) two patch series to make the issue >> more clear. The first patch adds a function which creates all devices >> with the properties set as needed. The second patch adds a '-usb2' >> switch to windup this in a user-friendly way. >> >> Adding a -usb2 switch sucks though. I'd prefer to have some way to >> create such devices via -device, but without asking the user to create >> all functions individually on the command line, i.e. have something >> along the lines of ... >> >> qemu -device ich9-usb,slot=08 > > This is the place where are current infrastructure pretty much stinks. > > The first problem is that the device factory interface should be > involved with device addressing. We really should have: > > qemu -device ich9-usb,id=uhci0 -set i440fx.slot[8]=uhci0 > > The device doesn't care what it's PCI slot address is. What exactly would such a split buy us? -device is not a message to the device, it's a message to whatever makes devices. Therefore, the fact that we specify the device address with -device doesn't mean we've artificially made the device to care for its address. [...]