[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operati
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky) |
Date: |
Fri, 22 Aug 2008 00:32:05 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Thu, Aug 21, 2008 at 07:30:32PM +0000, Anthony Liguori wrote:
> Revision: 5050
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5050
> Author: aliguori
> Date: 2008-08-21 19:30:31 +0000 (Thu, 21 Aug 2008)
>
> Log Message:
> -----------
> uhci: rewrite UHCI emulator, fully async operation with multiple outstanding
> transactions (Max Krasnyansky)
Please note that this commit has broken the -usbdevice option (at least
disk, tablet and mouse) for a GNU/Linux guest running a 2.6.18 kernel.
> This is esentially a re-write of the QEMU UHCI layer. My initial goal
> was to support fully async operation with multiple outstanding async
> transactions. Along the way I realized that I can greatly simplify
> and cleanup the overall logic. There was a lot of duplicate and confusing
> code in the UHCI data structure parsing and other places.
> We were actually violating UHCI spec in handling async ISOC transaction
> (host controller is not supposed to write into the frame pointer).
>
> The reason I wanted to support fully async operation is because current
> synchronous version is unusable with most devices exported from host
> (via usb-linux.c). Transactions take a long time and the whole VM becomes
> slow as hell.
>
> Current async support is very rudimentory and for the most part
> non-functional. Single transaction at a time is simply not enough. I have
> a device for which XP driver submits both IN and OUT packets at the same
> time. IN packet always times out unless OUT packet makes it to the device.
> Hence we must be able to process both in order for that device to work.
>
> The new code is backwards compatible and was first tested agains original
> synchronous usb-linux.c and builtin usb devices like tablet which is also
> synchronous. Rewrite of the usb-linux.c is coming up next.
>
> Async support was tested against various XP versions (ie XP, SP2, SP3) and
> a bunch of different USB devices: serial port controllers, mice, keyboard,
> JTAG dongles (from Xilinx and Altera).
>
> ISOC support was only lighly tested and needs more work. It's not any worse
> than current code though.
>
> UHCI parser changes are probably somewhat hard to review without the
> understanding of the UHCI spec.
> The async design should be fairly easy to follow. Basically we have a list
> of async objects for each pending transfer. Async objects are tagged with
> the original TD (transfer descriptor) address and token. We now support
> unlimited number of outstanding isoc and one outstanding bulk/intr/ctrl
> transfer per QH (queue head). UHCI spec does not have a clear protocol for
> the cancelation of the trasfer requests. Driver can yank out TDs on any
> frame boundary. In oder to handle that I added somewhat fancy TD validation
> logic logic to avoid unnecessary cancelations.
>
> Signed-off-by: Max Krasnyansky <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net
- [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Anthony Liguori, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky),
Aurelien Jarno <=
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Anthony Liguori, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Anthony Liguori, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Max Krasnyansky, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Aurelien Jarno, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Max Krasnyansky, 2008/08/21
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Max Krasnyansky, 2008/08/22
- Re: [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky), Aurelien Jarno, 2008/08/22