qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to u


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers
Date: Wed, 20 Jun 2012 08:25:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120601 Thunderbird/10.0.5

  Hi,

>> Like with any other device, it's hard ... what would happen on real
>> hardware is that the USB controller will get a target abort, which will
>> result in the controller reporting an error (typically in the PCI status
>> register) and stopping.

Not that hard, code to cancel in-flight transactions is in place already
as this can happen for other reasons too.

> handle this.  However, the USB case should be ok - it may not be
> theoretically guaranteed that the calls are close, but it's certainly
> the case at the moment.

Depends on the device.  For the usb hid devices (which is the most
important use case for power I think) packets will be processed
synchronously, so there is no problem here.

usb-storage can keep packets in flight without holding the qemu lock
(waiting for async block I/O finish).  Shouldn't be too long though.

usb-host keeps pretty much every packet in flight without holding the
qemu lock as it passes on the requests to the hosts usbfs, then waits
asynchronously for the request finish before returning the result to the
guest.  Depending on the kind of device you are passing though this can
be *very* long (minutes).

cheers,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]