Re: [PATCH 1/1] swiotlb: save io_tlb_used to local variable before leaving critical section

2019-04-14 Thread Dongli Zhang
As the patch to be fixed is still in Konrad's own tree, I will send the v2 for the patch to be fixed, instead of an incremental fix. Dongli Zhang On 4/12/19 10:13 PM, Joe Jin wrote: > I'm good to have this patch, which helps identify the cause of failure is > fragmentation or it really been used

Re: [PATCH 4/9] iommu/dma-iommu: Add iommu_dma_map_page_coherent

2019-04-14 Thread Christoph Hellwig
> @@ -693,7 +694,19 @@ dma_addr_t iommu_dma_map_page(struct device *dev, struct > page *page, > unsigned long offset, size_t size, int prot) > { > return __iommu_dma_map(dev, page_to_phys(page) + offset, size, prot, > - iommu_get_dma_domain(dev)); > +

Re: [PATCH 5/9] iommu/amd: Implement .flush_np_cache

2019-04-14 Thread Christoph Hellwig
> +static void amd_iommu_flush_np_cache(struct iommu_domain *domain, > + unsigned long iova, size_t size) > +{ > + struct protection_domain *dom = to_pdomain(domain); > + > + if (unlikely(amd_iommu_np_cache)) { Is this case really so unlikely that it needs a static branch predi

Re: [PATCH 1/9] iommu/dma-iommu: Add iommu_map_atomic

2019-04-14 Thread Christoph Hellwig
On Thu, Apr 11, 2019 at 07:47:30PM +0100, Tom Murphy via iommu wrote: > The iommu ops .map function (or the iommu_map function which calls it) > was always supposed to be sleepable (according to Joerg's comment in > this thread: https://lore.kernel.org/patchwork/patch/977520/ ) and so > should prob

Re: [PATCH 3/9] iommu/dma-iommu: Add iommu_dma_copy_reserved_iova, iommu_dma_apply_resv_region to the dma-iommu api

2019-04-14 Thread Christoph Hellwig
On Thu, Apr 11, 2019 at 07:47:32PM +0100, Tom Murphy via iommu wrote: > + > + WARN_ON_ONCE(iommu_dma_reserve_iova(domain, region->start, end) == > NULL); Overly long line.. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxf

Re: [PATCH 9/9] iommu/amd: Add allocated domain to global list earlier

2019-04-14 Thread Christoph Hellwig
On Thu, Apr 11, 2019 at 07:47:38PM +0100, Tom Murphy via iommu wrote: > dma_ops_domain_free() expects domain to be in a global list. > Arguably, could be called before protection_domain_init(). > > Signed-off-by: Dmitry Safonov > Signed-off-by: Tom Murphy This seems like a fix to the existing c

Re: [PATCH 8/9] iommu/amd: Clean up unused functions

2019-04-14 Thread Christoph Hellwig
On Thu, Apr 11, 2019 at 07:47:37PM +0100, Tom Murphy via iommu wrote: > Now that we are using the dma-iommu api we have a lot of unused code. > This patch removes all that unused code. This should be merged into the previous patch. ___ iommu mailing list

Re: [PATCH 0/9] iommu/amd: Convert the AMD iommu driver to the dma-iommu api

2019-04-14 Thread Christoph Hellwig
Hi Tom, can you rebase this on top of this series: https://lists.linuxfoundation.org/pipermail/iommu/2019-March/034357.html or the version addressing Robin's comments here: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-iommu-ops.3 so that we can avoid introducing more dma