qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Max Krasnyansky <maxk@kernel.org>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20080821223205.GA15756@volta.aurel32.net> (raw)
In-Reply-To: <E1KWFrc-0005MZ-BM@cvs.savannah.gnu.org>

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 <maxk@kernel.org>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> 

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

  reply	other threads:[~2008-08-21 22:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 19:30 [Qemu-devel] [5050] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions ( Max Krasnyansky) Anthony Liguori
2008-08-21 22:32 ` Aurelien Jarno [this message]
2008-08-21 22:38   ` Anthony Liguori
2008-08-21 22:43     ` Aurelien Jarno
2008-08-21 22:41   ` Anthony Liguori
2008-08-22  0:26     ` Max Krasnyansky
2008-08-22  1:46       ` Aurelien Jarno
2008-08-22  3:34         ` Max Krasnyansky
2008-08-22  6:07         ` Max Krasnyansky
2008-08-22  8:59           ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080821223205.GA15756@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=aliguori@us.ibm.com \
    --cc=maxk@kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).