From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4T9-0007nZ-Ir for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:10:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR4Sz-000772-Ne for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:10:15 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:49338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR4Sz-00074Q-GO for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:10:05 -0400 Received: by mail-we0-f173.google.com with SMTP id t11so373677wey.4 for ; Wed, 24 Oct 2012 10:10:03 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <508820E9.5010707@redhat.com> Date: Wed, 24 Oct 2012 19:10:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 25/26] q35: fill in usb pci slots with -usb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Baron Cc: agraf@suse.de, aliguori@us.ibm.com, alex.williamson@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, armbru@redhat.com, blauwirbel@gmail.com, yamahata@valinux.co.jp, juzhang@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, kraxel@redhat.com Il 19/10/2012 22:43, Jason Baron ha scritto: > From: Jason Baron > > This fills out the usb slots on q35, when -usb is passed. > We now have (lspci output): > > 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) > 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) > 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) > 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) > > Signed-off-by: Jason Baron > --- > hw/ich9.h | 5 ++++- > hw/pc_q35.c | 11 ++++++++++- > 2 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/hw/ich9.h b/hw/ich9.h > index de49135..9e19266 100644 > --- a/hw/ich9.h > +++ b/hw/ich9.h > @@ -87,8 +87,11 @@ typedef struct ICH9LPCState { > > > /* D29:F0 USB UHCI Controller #1 */ > -#define ICH9_USB_UHCI1_DEV 29 > +#define ICH9_USB_DEV 29 > #define ICH9_USB_UHCI1_FUNC 0 > +#define ICH9_USB_UHCI2_FUNC 1 > +#define ICH9_USB_UHCI3_FUNC 2 > +#define ICH9_USB_EHCI1_FUNC 7 > > /* D30:F0 DMI-to-PCI brdige */ > #define ICH9_D2P_BRIDGE "ICH9 D2P BRIDGE" > diff --git a/hw/pc_q35.c b/hw/pc_q35.c > index ca30b65..bde3749 100644 > --- a/hw/pc_q35.c > +++ b/hw/pc_q35.c > @@ -185,8 +185,17 @@ static void pc_q35_init_late(BusState **idebus, ISADevice *rtc_state, > if (usb_enabled) { > /* Should we create 6 UHCI according to ich9 spec? */ > pci_create_simple_multifunction( > - host_bus, PCI_DEVFN(ICH9_USB_UHCI1_DEV, ICH9_USB_UHCI1_FUNC), > + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI1_FUNC), > true, "ich9-usb-uhci1"); > + pci_create_simple_multifunction( > + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI2_FUNC), > + true, "ich9-usb-uhci2"); > + pci_create_simple_multifunction( > + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_UHCI3_FUNC), > + true, "ich9-usb-uhci3"); > + pci_create_simple_multifunction( > + host_bus, PCI_DEVFN(ICH9_USB_DEV, ICH9_USB_EHCI1_FUNC), > + true, "ich9-usb-ehci1"); > /* XXX: EHCI */ > } Compared to docs/ich9-ehci-uhci.cfg, this is missing: [device "uhci-1"] masterbus = "ehci.0" firstport = "0" [device "uhci-2"] masterbus = "ehci.0" firstport = "2" [device "uhci-3"] masterbus = "ehci.0" firstport = "4" Paolo