From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Raykz-00059x-Hv for qemu-devel@nongnu.org; Wed, 14 Dec 2011 19:01:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Raykx-0002TL-Rr for qemu-devel@nongnu.org; Wed, 14 Dec 2011 19:01:05 -0500 Received: from gate.crashing.org ([63.228.1.57]:50873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Raykx-0002TA-6l for qemu-devel@nongnu.org; Wed, 14 Dec 2011 19:01:03 -0500 Message-ID: <1323907246.21839.29.camel@pasglop> From: Benjamin Herrenschmidt Date: Thu, 15 Dec 2011 11:00:46 +1100 In-Reply-To: <4EE9199F.80305@codemonkey.ws> References: <1323854540.7671.16.camel@pasglop> <4EE9199F.80305@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] spapr: Add support for -vga option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alexander Graf , qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org, David Gibson On Wed, 2011-12-14 at 15:48 -0600, Anthony Liguori wrote: > > /* USB */ > > if (usb_enabled) { > > > usb_ohci_init_pci(QLIST_FIRST(&spapr->phbs)->host_state.bus, -1); > > + if (spapr_has_graphics) { > > + usbdevice_create("keyboard"); > > + usbdevice_create("mouse"); > > It is better to use usb_create() and pass it the usb bus directly as > this will make it easier to express this as composition down the road. How do I do that ? usb_ohci_init_pci() doesn't appear to return the USB bus.... Cheers, Ben.