Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Robin Murphy
On 29/09/15 17:40, Russell King - ARM Linux wrote: On Tue, Sep 29, 2015 at 05:27:12PM +0100, Robin Murphy wrote: Eh, swings and roundabouts. An argument denoting whether the flush is being called on the map or unmap path would be fine, Sorry, that statement is wrong. It's not about whether yo

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Russell King - ARM Linux
On Tue, Sep 29, 2015 at 05:27:12PM +0100, Robin Murphy wrote: > Eh, swings and roundabouts. An argument denoting whether the flush is being > called on the map or unmap path would be fine, Sorry, that statement is wrong. It's not about whether you flush before or after the DMA operation. I'm afr

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Robin Murphy
On 29/09/15 15:32, Russell King - ARM Linux wrote: On Tue, Sep 29, 2015 at 03:20:38PM +0100, Robin Murphy wrote: A single callback doesn't really generalise well enough: If we wanted to implement this in the ARM SMMU drivers to optimise the unmap() case [ask Will how long he spends waiting for a

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Russell King - ARM Linux
On Tue, Sep 29, 2015 at 03:20:38PM +0100, Robin Murphy wrote: > A single callback doesn't really generalise well enough: If we wanted to > implement this in the ARM SMMU drivers to optimise the unmap() case [ask > Will how long he spends waiting for a software model to tear down an entire > VFIO do

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Robin Murphy
Hi Tomasz, On 29/09/15 06:25, Tomasz Figa wrote: Currently the IOMMU subsystem provides 3 basic operations: iommu_map(), iommu_map_sg() and iommu_unmap(). iommu_map() can be used to map memory page by page, however it involves flushing the caches (CPU and IOMMU) for every mapped page separately,

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Joerg Roedel
On Tue, Sep 29, 2015 at 11:27:14AM +0200, Thierry Reding wrote: > On Tue, Sep 29, 2015 at 02:25:23PM +0900, Tomasz Figa wrote: > > 3) possibility of exporting the iommu_flush() operation and providing > > unsynchronized map/unmap operations for subsystems with even higher > > requirements

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Joerg Roedel
Hi Tomasz, On Tue, Sep 29, 2015 at 02:25:23PM +0900, Tomasz Figa wrote: > This series tries to mitigate the two issues above, while acknowledging > the fact that the .map_sg() callback might be still necessary for some > specific platforms, which could have the need to iterate over SG elements > i

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Tomasz Figa
On Tue, Sep 29, 2015 at 6:27 PM, Thierry Reding wrote: > > On Tue, Sep 29, 2015 at 02:25:23PM +0900, Tomasz Figa wrote: > > Currently the IOMMU subsystem provides 3 basic operations: iommu_map(), > > iommu_map_sg() and iommu_unmap(). iommu_map() can be used to map memory > > page by page, however

Re: [RFC PATCH 0/3] iommu: Add range flush operation

2015-09-29 Thread Thierry Reding
On Tue, Sep 29, 2015 at 02:25:23PM +0900, Tomasz Figa wrote: > Currently the IOMMU subsystem provides 3 basic operations: iommu_map(), > iommu_map_sg() and iommu_unmap(). iommu_map() can be used to map memory > page by page, however it involves flushing the caches (CPU and IOMMU) for > every mapped

[RFC PATCH 0/3] iommu: Add range flush operation

2015-09-28 Thread Tomasz Figa
Currently the IOMMU subsystem provides 3 basic operations: iommu_map(), iommu_map_sg() and iommu_unmap(). iommu_map() can be used to map memory page by page, however it involves flushing the caches (CPU and IOMMU) for every mapped page separately, which is unsuitable for use cases that require low