From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GBsdz-0002FR-Bv for qemu-devel@nongnu.org; Sat, 12 Aug 2006 08:31:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GBsdy-0002E3-5F for qemu-devel@nongnu.org; Sat, 12 Aug 2006 08:31:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GBsdx-0002De-Ta for qemu-devel@nongnu.org; Sat, 12 Aug 2006 08:31:09 -0400 Received: from [84.96.92.61] (helo=sMtp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GBsjK-0001LY-1N for qemu-devel@nongnu.org; Sat, 12 Aug 2006 08:36:42 -0400 Received: from [84.102.211.154] by sp604002mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0J3V00NOLXFW4XL0@sp604002mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Sat, 12 Aug 2006 14:31:08 +0200 (CEST) Date: Sat, 12 Aug 2006 14:31:21 +0200 From: Fabrice Bellard Subject: Re: [Qemu-devel] qemu usb-linux.c vl.h hw/esp.c hw/lsi53c895a.c ... In-reply-to: Message-id: <44DDCA19.4030903@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: 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 Hi, OK for the SCSI async support. I am making changes to have a better low level handling of CDROMs (both real host CDROMs and emulated ones), but I don't know when it will be ready. The changes mostly consists in adding a method in the block devices to support packet CD commands. About async USB, maybe some simplifications are possible. When you have a real USB controller, there is always a single current request and you don't neep to have provisions to handle several ones (of course more complicated host controllers could do that, but it is not useful to model it now). Moreover, the devices must reply to the request immediately so the request are asynchronous just because it takes a few uS to send the data, not because the device blocks (I am not sure it is clear for you). So in QEMU, async USB is not needed in practise for emulated devices. For MSD you don't need it for example even if you are using SCSI AIO because the host keep polling the MSD storage device until there is an SCSI reply. Async USB is only really needed in the case where QEMU speaks to a host device. In this case the operation to send a TD may block (ideally at most 1 ms) and it is interesting to hide that to the guest. In this case, we must make compromises to hide this fact to the guest. Your proposal seems good for that but USB frames will be longer than 1 ms in case of host devices (and I am ready to accept that as it is better than the previous solution !). The more complicated implementation would be to suppress USB async as you did it but to export to the generic USB layers that list of TD that the controller maintains. Then it is possible to submit several requests at once to the host devices while having a consistent low level model. Regards, Fabrice.