Re: [Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps

2012-06-21 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 16:25 -0500, Anthony Liguori wrote: > > +static void dma_aio_cancel(BlockDriverAIOCB *acb) > > +{ > > +DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common); > > + > > +trace_dma_aio_cancel(dbs); > > + > > +if (dbs->acb) { > > +BlockDriverAIOCB *acb = dbs->a

Re: [Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps

2012-06-20 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 16:25 -0500, Anthony Liguori wrote: > So this cancellation stuff is hopelessly broken > > It's simply not possible to fully cancel pending DMA in a synchronous > callback. Well, at least for PAPR H_PUT_TCE, cancellation must be synchronous, ie the hypercall must not return

Re: [Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps

2012-06-20 Thread Anthony Liguori
On 06/19/2012 01:39 AM, Benjamin Herrenschmidt wrote: From: David Gibson One new complication raised by IOMMU support over only handling DMA directly to physical addresses is handling dma_memory_map() case (replacing cpu_physical_memory_map()) when the IOMMU translation the IOVAs covered by such

[Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps

2012-06-19 Thread Benjamin Herrenschmidt
From: David Gibson One new complication raised by IOMMU support over only handling DMA directly to physical addresses is handling dma_memory_map() case (replacing cpu_physical_memory_map()) when the IOMMU translation the IOVAs covered by such a map are invalidated or changed while the map is acti

[Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps

2012-05-09 Thread Benjamin Herrenschmidt
From: David Gibson One new complication raised by IOMMU support over only handling DMA directly to physical addresses is handling dma_memory_map() case (replacing cpu_physical_memory_map()) when the IOMMU translation the IOVAs covered by such a map are invalidated or changed while the map is acti