Re: [PATCH RFC v1 4/7] swiotlb: to implement io_tlb_high_mem

2022-06-10 Thread Dongli Zhang
Hi Christoph, On 6/8/22 10:05 PM, Christoph Hellwig wrote: > All this really needs to be hidden under the hood. > Since this patch file has 200+ lines, would you please help clarify what does 'this' indicate? The idea of this patch: 1. Convert the functions to initialize swiotlb into callee. T

Re: [PATCH v3 3/4] scsi: core: Cap shost max_sectors according to DMA optimum mapping limits

2022-06-10 Thread John Garry via iommu
On 09/06/2022 21:34, Bart Van Assche wrote: On 6/9/22 10:54, John Garry wrote: ok, but do you have a system where the UFS host controller is behind an IOMMU? I had the impression that UFS controllers would be mostly found in embedded systems and IOMMUs are not as common on there. Modern phone

[PATCH] uacce: fix concurrency of fops_open and uacce_remove

2022-06-10 Thread Zhangfei Gao
The uacce parent's module can be removed when uacce is working, which may cause troubles. If rmmod/uacce_remove happens just after fops_open: bind_queue, the uacce_remove can not remove the bound queue since it is not added to the queue list yet, which blocks the uacce_disable_sva. Change queues_

[PATCH v2] dt-bindings: iommu: renesas, ipmmu-vmsa: R-Car V3U is R-Car Gen4

2022-06-10 Thread Geert Uytterhoeven
Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence move its compatible value to the R-Car Gen4 section. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Acked-by: Joerg Roedel Reviewed-by: Wolfram Sang --- v2: - Add Acked-by, Reviewed-by, - Add

Re: [PATCH v8 02/11] iommu: Add max_pasids field in struct dev_iommu

2022-06-10 Thread Baolu Lu
On 2022/6/10 17:01, Tian, Kevin wrote: From: Baolu Lu Sent: Friday, June 10, 2022 2:47 PM On 2022/6/10 03:01, Raj, Ashok wrote: On Tue, Jun 07, 2022 at 09:49:33AM +0800, Lu Baolu wrote: @@ -218,6 +219,30 @@ static void dev_iommu_free(struct device *dev) kfree(param); } +static u32

RE: [PATCH v8 02/11] iommu: Add max_pasids field in struct dev_iommu

2022-06-10 Thread Tian, Kevin
> From: Baolu Lu > Sent: Friday, June 10, 2022 2:47 PM > > On 2022/6/10 03:01, Raj, Ashok wrote: > > On Tue, Jun 07, 2022 at 09:49:33AM +0800, Lu Baolu wrote: > >> @@ -218,6 +219,30 @@ static void dev_iommu_free(struct device *dev) > >>kfree(param); > >> } > >> > >> +static u32 dev_iommu_ge

RE: [PATCH v8 01/11] iommu: Add max_pasids field in struct iommu_device

2022-06-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, June 10, 2022 7:53 AM > > On Thu, Jun 09, 2022 at 05:25:42PM +, Raj, Ashok wrote: > > > > On Tue, Jun 07, 2022 at 09:49:32AM +0800, Lu Baolu wrote: > > > Use this field to keep the number of supported PASIDs that an IOMMU > > > hardware is able to suppo

[PATCH] dma-direct: take dma-ranges/offsets into account in resource mapping

2022-06-10 Thread Serge Semin via iommu
A basic device-specific linear memory mapping was introduced back in commit ("dma: Take into account dma_pfn_offset") as a single-valued offset preserved in the device.dma_pfn_offset field, which was initialized for instance by means of the "dma-ranges" DT property. Afterwards the functionality was

Re: [PATCH v8 04/11] iommu: Add sva iommu_domain support

2022-06-10 Thread Baolu Lu
On 2022/6/10 04:25, Raj, Ashok wrote: Hi Baolu Hi Ashok, some minor nits. Thanks for your comments. On Tue, Jun 07, 2022 at 09:49:35AM +0800, Lu Baolu wrote: The sva iommu_domain represents a hardware pagetable that the IOMMU hardware could use for SVA translation. This adds some infra