Re: [PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-18 Thread Will Deacon
Hi Joerg, On Thu, Aug 17, 2017 at 11:20:54PM +0200, Joerg Roedel wrote: > On Thu, Aug 17, 2017 at 06:17:05PM +0100, Will Deacon wrote: > > On Thu, Aug 17, 2017 at 06:50:40PM +0200, Joerg Roedel wrote: > > > Problem currently is how to get this information from > > > 'struct iommu_device' to 'struc

Re: [PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-17 Thread Joerg Roedel
Hi Will, On Thu, Aug 17, 2017 at 06:17:05PM +0100, Will Deacon wrote: > On Thu, Aug 17, 2017 at 06:50:40PM +0200, Joerg Roedel wrote: > > Problem currently is how to get this information from > > 'struct iommu_device' to 'struct iommu_domain'. As a workaround I > > consider a per-domain flag in th

Re: [PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-17 Thread Will Deacon
Hi Joerg, On Thu, Aug 17, 2017 at 06:50:40PM +0200, Joerg Roedel wrote: > On Thu, Aug 17, 2017 at 05:32:35PM +0100, Will Deacon wrote: > > I really like the idea of this, but I have a couple of questions and > > comments below. > > Great, this together with the common iova-flush it should make it

Re: [PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-17 Thread Joerg Roedel
Hi Will, On Thu, Aug 17, 2017 at 05:32:35PM +0100, Will Deacon wrote: > I really like the idea of this, but I have a couple of questions and > comments below. Great, this together with the common iova-flush it should make it possible to solve the performance problems of the dma-iommu code. > > +

Re: [PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-17 Thread Will Deacon
Hi Joerg, I really like the idea of this, but I have a couple of questions and comments below. On Thu, Aug 17, 2017 at 02:56:25PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > With the current IOMMU-API the hardware TLBs have to be > flushed in every iommu_map(), iommu_map_sg(), and > iom

[PATCH 02/13] iommu: Introduce Interface for IOMMU TLB Flushing

2017-08-17 Thread Joerg Roedel
From: Joerg Roedel With the current IOMMU-API the hardware TLBs have to be flushed in every iommu_map(), iommu_map_sg(), and iommu_unmap() call. For unmapping large amounts of address space, like it happens when a KVM domain with assigned devices is destroyed, this causes thousands of unnecessar