Hi,

> Note that usb_packet_map() invokes dma_memory_map() with a NULL invalidate
> callback function.  When IOMMU support is added, this will mean that
> usb_packet_map() and the corresponding usb_packet_unmap() must be called in
> close proximity without dropping the qemu device lock

Well, that isn't guaranteed ...

> - otherwise the guest
> might invalidate IOMMU mappings while they are still in use by the device
> code.

Guest tearing down mapping while usb packets using them are still in
flight would be a guest bug.  Still not impossible to happen though. How
is this case supposed to be handled?

cheers,
  Gerd

Reply via email to