Re: [PATCH] dma-mapping: make map_benchmark compile into module

2021-03-24 Thread Christoph Hellwig
On Wed, Mar 24, 2021 at 10:17:38AM +0800, Tian Tao wrote: > under some scenarios, it is necessary to compile map_benchmark > into module to test iommu, so this patch changed Kconfig and > export_symbol to implement map_benchmark compiled into module. > > On the other hand, map_benchmark is a

RE: [PATCH] dma-mapping: make map_benchmark compile into module

2021-03-24 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Wednesday, March 24, 2021 8:13 PM > To: tiantao (H) > Cc: a...@linux-foundation.org; pet...@infradead.org; paul...@kernel.org; > a...@kernel.org; t...@linutronix.de; rost...@goodmis.org; h...@lst.de; >

Re: [PATCH 3/5] iommu/vt-d: Remove SVM_FLAG_PRIVATE_PASID

2021-03-24 Thread Lu Baolu
Hi Christoph, On 3/24/21 1:33 AM, Christoph Hellwig wrote: On Tue, Mar 23, 2021 at 09:05:58AM +0800, Lu Baolu wrote: The SVM_FLAG_PRIVATE_PASID has never been referenced in the tree, and there's no plan to have anything to use it. So cleanup it. Signed-off-by: Lu Baolu Looks good,

[PATCH 1/1] iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK

2021-03-24 Thread Zhen Lei
In arm_smmu_gerror_handler(), the value of the SMMU_GERROR register is filtered by GERROR_ERR_MASK. However, the GERROR_ERR_MASK does not contain the SFM bit. As a result, the subsequent error processing is not performed when only the SFM error occurs. Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add

Re: [RFC PATCH v2 1/8] ACPICA: IORT: Update for revision E

2021-03-24 Thread Lorenzo Pieralisi
On Tue, Mar 23, 2021 at 06:51:44PM +, Kaneda, Erik wrote: > > > > -Original Message- > > From: Lorenzo Pieralisi > > Sent: Tuesday, March 23, 2021 8:54 AM > > To: Kaneda, Erik > > Cc: Shameerali Kolothum Thodi ; > > linux-arm-ker...@lists.infradead.org; linux-a...@vger.kernel.org;

Re: [PATCH v3] swiotlb: Make SWIOTLB_NO_FORCE perform no allocation

2021-03-24 Thread Christoph Hellwig
On Mon, Mar 22, 2021 at 06:53:49PM -0700, Florian Fainelli wrote: > When SWIOTLB_NO_FORCE is used, there should really be no allocations of > default_nslabs to occur since we are not going to use those slabs. If a > platform was somehow setting swiotlb_no_force and a later call to > swiotlb_init()

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-24 Thread Robin Murphy
On 2021-03-20 15:19, Sven Peter wrote: Hi, After Hector's initial work [1] to bring up Linux on Apple's M1 it's time to bring up more devices. Most peripherals connected to the SoC are behind a iommu which Apple calls "Device Address Resolution Table", or DART for short [2]. Unfortunately, it

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-03-24 Thread Jacob Pan
Hi Jean-Philippe, On Mon, 22 Mar 2021 10:24:00 +0100, Jean-Philippe Brucker wrote: > On Fri, Mar 19, 2021 at 11:22:21AM -0700, Jacob Pan wrote: > > Hi Jason, > > > > On Fri, 19 Mar 2021 10:54:32 -0300, Jason Gunthorpe > > wrote: > > > On Fri, Mar 19, 2021 at 02:41:32PM +0100, Jean-Philippe

Re: [RFC PATCH v2 04/11] PCI/P2PDMA: Introduce pci_p2pdma_should_map_bus() and pci_p2pdma_bus_offset()

2021-03-24 Thread Jason Gunthorpe
On Mon, Mar 15, 2021 at 10:27:08AM -0600, Logan Gunthorpe wrote: > In this case the WARN_ON is just to guard against misuse of the > function. It should never happen unless a developer changes the code in > a way that is incorrect. So I think that's the correct use of WARN_ON. > Though I might

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-03-24 Thread Jason Gunthorpe
On Wed, Mar 24, 2021 at 10:02:46AM -0700, Jacob Pan wrote: > > Also wondering about device driver allocating auxiliary domains for their > > private use, to do iommu_map/unmap on private PASIDs (a clean replacement > > to super SVA, for example). Would that go through the same path as > >

Re: [RFC PATCH v2 04/11] PCI/P2PDMA: Introduce pci_p2pdma_should_map_bus() and pci_p2pdma_bus_offset()

2021-03-24 Thread Christian König
Am 24.03.21 um 18:21 schrieb Jason Gunthorpe: On Mon, Mar 15, 2021 at 10:27:08AM -0600, Logan Gunthorpe wrote: In this case the WARN_ON is just to guard against misuse of the function. It should never happen unless a developer changes the code in a way that is incorrect. So I think that's the

Re: [PATCH 1/3] iommu: io-pgtable: add DART pagetable format

2021-03-24 Thread Robin Murphy
On 2021-03-20 15:19, Sven Peter wrote: Apple's DART iommu uses a pagetable format that's very similar to the ones already implemented by io-pgtable.c. Add a new format variant to support the required differences. TBH there look to be more differences than similarities, but I guess we already

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-03-24 Thread Jacob Pan
Hi Jason, On Mon, 22 Mar 2021 09:03:00 -0300, Jason Gunthorpe wrote: > On Fri, Mar 19, 2021 at 11:22:21AM -0700, Jacob Pan wrote: > > Hi Jason, > > > > On Fri, 19 Mar 2021 10:54:32 -0300, Jason Gunthorpe > > wrote: > > > On Fri, Mar 19, 2021 at 02:41:32PM +0100, Jean-Philippe Brucker > > >

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-03-24 Thread Jacob Pan
Hi Jason, On Wed, 24 Mar 2021 14:03:38 -0300, Jason Gunthorpe wrote: > On Wed, Mar 24, 2021 at 10:02:46AM -0700, Jacob Pan wrote: > > > Also wondering about device driver allocating auxiliary domains for > > > their private use, to do iommu_map/unmap on private PASIDs (a clean > > > replacement

[PATCH] iommu: Fix a boundary issue to avoid performance drop

2021-03-24 Thread chenxiang
From: Xiang Chen After the change of patch ("iommu: Switch gather->end to the inclusive end"), the performace drops from 1600+K IOPS to 1200K in our kunpeng ARM64 platform. We find that the range [start1, end1) actually is joint from the range [end1, end2), but it is considered as disjoint