From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYlE2-0002Fg-Ut for qemu-devel@nongnu.org; Sun, 06 Nov 2005 09:10:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYlDy-0002FJ-Rp for qemu-devel@nongnu.org; Sun, 06 Nov 2005 09:10:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYlDx-0002FD-CB for qemu-devel@nongnu.org; Sun, 06 Nov 2005 09:10:21 -0500 Received: from [84.96.92.55] (helo=smtP.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EYlDx-00022b-7k for qemu-devel@nongnu.org; Sun, 06 Nov 2005 09:10:21 -0500 Received: from [84.99.204.146] by sp604004mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0IPJ00BHRE17JP71@sp604004mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Sun, 06 Nov 2005 15:10:19 +0100 (CET) Date: Sun, 06 Nov 2005 15:11:49 +0100 From: Fabrice Bellard Subject: Re: [Qemu-devel] USB support In-reply-to: <200511051124.19779.lmendez19@austin.rr.com> Message-id: <436E0F25.9090205@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <436CC599.3080905@bellard.org> <200511051731.24176.info@vruppert.de> <436CE785.10806@bellard.org> <200511051124.19779.lmendez19@austin.rr.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Lonnie Mendez wrote: > On Saturday 05 November 2005 11:10 am, Fabrice Bellard wrote: > >>1) The host OS must not use the USB device. It means in particular that >>no host OS driver must be present for that device. The solution I am >>using is to rename the host kernel module "usb-storage.o" to >>"usb-storage.o.disabled" so that it is not loaded by Linux. Then QEMU >>can exclusively access to the corresponding host storage USB device. The >>same apply to every other type of USB devices. > > > usb devfs has a disconnect ioctl (USBDEVFS_DISCONNECT) which > allows you to disconnect a single device from a driver. > > A suggestion is to hook the interface up to qemu monitor. Then you would > be able to list usb devices and then claim only the ones you want to use. Good idea. I am adding something like that: In the monitor: 'info usbhost' lists the available host USB devices 'usbhost_add 3.4' or 'usbhost_add 1234:5678' adds the USB host device on bus 3 at address 4 or the first one matching the vendor ID 0x1234 and product ID 0x5678. The QEMU option '-usbhost x' can be used to do the same as usbhost_add. Fabrice.