From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EbPfS-0002bq-0Y for qemu-devel@nongnu.org; Sun, 13 Nov 2005 16:45:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EbPfO-0002a9-5i for qemu-devel@nongnu.org; Sun, 13 Nov 2005 16:45:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EbPfN-0002Zz-TQ for qemu-devel@nongnu.org; Sun, 13 Nov 2005 16:45:38 -0500 Received: from [84.96.92.60] (helo=Smtp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EbPfN-0000Fq-Pp for qemu-devel@nongnu.org; Sun, 13 Nov 2005 16:45:38 -0500 Received: from [84.102.211.252] by sp604001mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTP id <0IPW00GZVXRZ4HS0@sp604001mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Sun, 13 Nov 2005 22:45:35 +0100 (CET) Date: Sun, 13 Nov 2005 22:47:10 +0100 From: Fabrice Bellard Subject: Re: [Qemu-devel] [patch] USB support In-reply-to: <4376901A.1030805@gmx.de> Message-id: <4377B45E.9030604@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> <436E0F25.9090205@bellard.org> <4376901A.1030805@gmx.de> 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 > When I use usb_add, I get: > USBDEVFS_DISCONNECT: Inappropriate ioctl for device > > This is with snapshot from 2005-11-11, on Debian testing, kernel 2.6.13 > (with 1000Hz timer). > The patch below fixes this (plainly taken from > http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg35550.html > ; is ifno = 0 correct?) Thank you. I was not able to test this ioctl on my PC, hence the problem... > With this patch, qemu recognized all USB devices I had available - which > is actually only one device, a joystick :) > Win2k showed it in the control panel with all available buttons and axes > and reacted to events correctly. > > Though, a strange thing is that as long as the device is attached to the > guest, Windows gets very slow. The Windows task manager shows that the > guest CPU load is at 100%; but "top" on the guest shows that qemu uses > only 20% host CPU. This starts as soon as usb_add is executed, and stops > as soon as usb_del is executed. > Does qemu use sleep in the usb code, or does maybe Windows sent the CPU > a HLT ? I don't really understand that behaviour :) As mentionned in the documentation, the USB host emulation is very slow in QEMU. The problem is that USB requests block the whole VM. I plan to implement non blocking USB I/Os soon. Fabrice.