[Top][All Lists]
[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
[Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Benjamin Herrenschmidt, 2012/06/19
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Gerd Hoffmann, 2012/06/19
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Benjamin Herrenschmidt, 2012/06/19
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, David Gibson, 2012/06/19
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Benjamin Herrenschmidt, 2012/06/19
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, David Gibson, 2012/06/20
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Benjamin Herrenschmidt, 2012/06/20
- Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Gerd Hoffmann, 2012/06/20
[Qemu-devel] [PATCH 11/13] iommu: Allow PCI to use IOMMU infrastructure, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 13/13] Add a memory barrier to DMA functions, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 12/13] pseries: Implement IOMMU and DMA for PAPR PCI devices, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 10/13] pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure, Benjamin Herrenschmidt, 2012/06/19
[Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set(), Benjamin Herrenschmidt, 2012/06/19