Received: from eggs.gnu.org ([140.186.70.92]:53060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcbsz-0005I1-N7 for qemu-devel@nongnu.org; Fri, 01 Jul 2011 07:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qcbst-0005Ch-If for qemu-devel@nongnu.org; Fri, 01 Jul 2011 07:27:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qcbss-0005C3-HG for qemu-devel@nongnu.org; Fri, 01 Jul 2011 07:27:42 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p61BReJv010348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Jul 2011 07:27:40 -0400 From: Gerd Hoffmann Date: Fri, 1 Jul 2011 13:27:24 +0200 Message-Id: <1309519646-3206-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] PCI: how handle multifunction / compound devices best? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 ... instead of ... qemu \ -device ich9-usb-ehci1,addr=08.7,multifunction=on,id=ehci \ -device ich9-usb-uhci1,addr=08.0,multifunction=on,masterbus=ehci.0,firstport=0 \ -device ich9-usb-uhci2,addr=08.1,multifunction=on,masterbus=ehci.0,firstport=2 \ -device ich9-usb-uhci3,addr=08.2,multifunction=on,masterbus=ehci.0,firstport=4 Suggestions? cheers, Gerd [1] full series @ http://www.kraxel.org/cgit/qemu/log/?h=usb.18 Gerd Hoffmann (2): usb: add ich9_ehci_with_companion_init() usb: windup ich9_ehci_with_companion_init via -usb2 switch. hw/pc_piix.c | 14 ++++++++++---- hw/usb-ehci.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ hw/usb.h | 3 +++ qemu-options.hx | 13 +++++++++++-- vl.c | 3 +++ 5 files changed, 76 insertions(+), 6 deletions(-)