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

2017-09-01 Thread Joerg Roedel
Hi Will, On Fri, Sep 01, 2017 at 06:20:45PM +0100, Will Deacon wrote: > On Wed, Aug 23, 2017 at 03:50:04PM +0200, Joerg Roedel wrote: > > +EXPORT_SYMBOL_GPL(iommu_unmap_fast); > > Really minor nit, but I think that iommu_unmap_nosync is a more descriptive > name (who wouldn't want to use the

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

2017-09-01 Thread Will Deacon
Hi Joerg, On Wed, Aug 23, 2017 at 03:50:04PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > With the current IOMMU-API the hardware TLBs have to be > flushed in every iommu_ops->unmap() call-back. > > For unmapping large amounts of address space, like it > happens when a

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

2017-08-29 Thread Joerg Roedel
On Tue, Aug 29, 2017 at 12:23:36PM +0100, Robin Murphy wrote: > On 23/08/17 14:50, Joerg Roedel wrote: > [...] > > @@ -350,6 +379,20 @@ static inline size_t iommu_map_sg(struct iommu_domain > > *domain, > > return domain->ops->map_sg(domain, iova, sg, nents, prot); > > } > > > > +static

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

2017-08-29 Thread Leizhen (ThunderTown)
On 2017/8/29 19:19, Robin Murphy wrote: > On 29/08/17 03:53, Leizhen (ThunderTown) wrote: > [...] >>> -size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t >>> size) >>> +static size_t __iommu_unmap(struct iommu_domain *domain, >>> + unsigned long

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

2017-08-29 Thread Robin Murphy
On 23/08/17 14:50, Joerg Roedel wrote: [...] > @@ -350,6 +379,20 @@ static inline size_t iommu_map_sg(struct iommu_domain > *domain, > return domain->ops->map_sg(domain, iova, sg, nents, prot); > } > > +static inline size_t iommu_map_sg_sync(struct iommu_domain *domain, > +

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

2017-08-29 Thread Robin Murphy
On 29/08/17 03:53, Leizhen (ThunderTown) wrote: [...] >> -size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t >> size) >> +static size_t __iommu_unmap(struct iommu_domain *domain, >> +unsigned long iova, size_t size, >> +bool

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

2017-08-28 Thread Leizhen (ThunderTown)
On 2017/8/23 21:50, Joerg Roedel wrote: > From: Joerg Roedel > > With the current IOMMU-API the hardware TLBs have to be > flushed in every iommu_ops->unmap() call-back. > > For unmapping large amounts of address space, like it > happens when a KVM domain with assigned

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

2017-08-23 Thread Joerg Roedel
From: Joerg Roedel With the current IOMMU-API the hardware TLBs have to be flushed in every iommu_ops->unmap() call-back. For unmapping large amounts of address space, like it happens when a KVM domain with assigned devices is destroyed, this causes thousands of unnecessary TLB