Re: [PATCH] uio: Replace mutex info_lock with percpu_ref to improve performance

2022-02-08 Thread Christoph Hellwig
On Tue, Feb 08, 2022 at 03:19:20PM +0800, Guixin Liu wrote: > This patch includes a modification to repace mutex info_lock with > percpu_ref, in order to improve uio performance. What performance critical use case do you have for uio? Everyone really should be using vfio these days due to the

Re: [PATCH v2 1/1] iommu/dma: Use DMA ops setter instead of direct assignment

2022-02-08 Thread Christoph Hellwig
On Mon, Feb 07, 2022 at 03:55:32PM +, Robin Murphy wrote: > On 2022-02-07 14:13, Andy Shevchenko wrote: > > Use DMA ops setter instead of direct assignment. Even we know that > > this module doesn't perform access to the dma_ops member of struct device, > > it's better to use setter to avoid

Re: [PATCH v2 10/10] iommu: Split struct iommu_ops

2022-02-08 Thread Christoph Hellwig
On Tue, Feb 08, 2022 at 09:25:59AM +0800, Lu Baolu wrote: > Move the domain specific operations out of struct iommu_ops into a new > structure that only has domain specific operations. This solves the > problem of needing to know if the method vector for a given operation > needs to be retrieved

Re: [PATCH v2 09/10] iommu: Use dev_iommu_ops() helper

2022-02-08 Thread Christoph Hellwig
On Tue, Feb 08, 2022 at 09:25:58AM +0800, Lu Baolu wrote: > Convert all the feasible instances of dev->bus->iommu_ops to > dev_iommu_ops() in order to making the operation of obtaining > iommu_ops from a device consistent. I'm not a native speaker, but I think this should read ".. in order to

Re: [PATCH v2 08/10] iommu: Remove unused argument in is_attach_deferred

2022-02-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 07/10] iommu: Use right way to retrieve iommu_ops

2022-02-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 05/10] iommu: Remove apply_resv_region

2022-02-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] dt-bindings: iommu: renesas,ipmmu-vmsa: Reformat renesas,ipmmu-main description

2022-02-08 Thread Rob Herring
On Wed, Jan 26, 2022 at 01:24:32PM +0100, Geert Uytterhoeven wrote: > Remove trailing whitespace and break overly long lines. > > Signed-off-by: Geert Uytterhoeven > --- > .../devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH 1/2] dt-bindings: mediatek: mt8186: Add binding for MM iommu

2022-02-08 Thread Rob Herring
On Tue, 25 Jan 2022 17:32:43 +0800, Yong Wu wrote: > Add mt8186 iommu binding. "-mm" means the iommu is for Multimedia. > > Signed-off-by: Yong Wu > --- > .../bindings/iommu/mediatek,iommu.yaml| 4 + > .../dt-bindings/memory/mt8186-memory-port.h | 217 ++ > 2 files

Error when running fio against nvme-of rdma target (mlx5 driver)

2022-02-08 Thread Martin Oliveira
Hello, We have been hitting an error when running IO over our nvme-of setup, using the mlx5 driver and we are wondering if anyone has seen anything similar/has any suggestions. Both initiator and target are AMD EPYC 7502 machines connected over RDMA using a Mellanox MT28908. Target has 12

Re: iommu/amd: bug report: page table memory leak

2022-02-08 Thread Suthikulpanit, Suravee via iommu
Hi Daniel, On 1/19/2022 2:47 AM, Daniel Jordan wrote: Hi, I've hit a memory leak while testing qemu v6.2.0-rc4 on an AMD EPYC 7J13 (Milan) system. Starting an almost 1T guest, the leak is over 1.5G per qemu invocation. I haven't checked whether the leak is proportional to guest size. It

Re: [PATCH] iommu/arm-smmu-v3: fix event handling soft lockup

2022-02-08 Thread Will Deacon
On Wed, 19 Jan 2022 07:07:54 +, Zhou Guanghui wrote: > During event processing, events are read from the event queue one > by one until the queue is empty.If the master device continuously > requests address access at the same time and the SMMU generates > events, the cyclic processing of the

Re: [PATCH] iommu/arm-smmu: Add missing pm_runtime_disable() in qcom_iommu_device_probe

2022-02-08 Thread Will Deacon
On Wed, 5 Jan 2022 10:16:19 +, Miaoqian Lin wrote: > If the probe fails, we should use pm_runtime_disable() to balance > pm_runtime_enable(). > Add missing pm_runtime_disable() for error handling. > > Applied to will (for-joerg/arm-smmu/updates), thanks! [1/1] iommu/arm-smmu: Add missing

Re: [PATCH v2 1/2] iommu/arm-smmu-v3: Avoid open coded arithmetic in memory allocation

2022-02-08 Thread Will Deacon
On Mon, 7 Feb 2022 23:50:48 +0100, Christophe JAILLET wrote: > kmalloc_array()/kcalloc() should be used to avoid potential overflow when > a multiplication is needed to compute the size of the requested memory. > > So turn a devm_kzalloc()+explicit size computation into an equivalent >

Re: [PATCH 1/2] iommu/arm-smmu: Use platform_irq_count() to get the interrupt count

2022-02-08 Thread Will Deacon
On Tue, Feb 08, 2022 at 03:28:50PM +, Robin Murphy wrote: > On 2022-02-08 15:19, Will Deacon wrote: > > On Thu, Dec 23, 2021 at 02:14:35PM +, Robin Murphy wrote: > > > On 2021-12-23 13:00, Lad Prabhakar wrote: > > > > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static > > > >

Re: [PATCH 1/2] iommu/arm-smmu: Use platform_irq_count() to get the interrupt count

2022-02-08 Thread Robin Murphy
On 2022-02-08 15:19, Will Deacon wrote: On Thu, Dec 23, 2021 at 02:14:35PM +, Robin Murphy wrote: On 2021-12-23 13:00, Lad Prabhakar wrote: platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using

Re: [PATCH 1/2] iommu/arm-smmu: Use platform_irq_count() to get the interrupt count

2022-02-08 Thread Will Deacon
On Thu, Dec 23, 2021 at 02:14:35PM +, Robin Murphy wrote: > On 2021-12-23 13:00, Lad Prabhakar wrote: > > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static > > allocation of IRQ resources in DT core code, this causes an issue > > when using hierarchical interrupt domains using

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-02-08 Thread Fenghua Yu
On Tue, Feb 08, 2022 at 10:41:39AM +0800, Lu Baolu wrote: > On 2/8/22 7:02 AM, Fenghua Yu wrote: > > PASIDs are process wide. It was attempted to use refcounted PASIDs to > > free them when the last thread drops the refcount. This turned out to > > be complex and error prone. Given the fact that

Re: [PATCH] Netvsc: Call hv_unmap_memory() in the netvsc_device_remove()

2022-02-08 Thread Tianyu Lan
On 2/3/2022 1:05 AM, Michael Kelley (LINUX) wrote: From: Tianyu Lan Sent: Tuesday, February 1, 2022 8:32 AM netvsc_device_remove() calls vunmap() inside which should not be called in the interrupt context. Current code calls hv_unmap_memory() in the free_netvsc_device() which is rcu callback

Re: [syzbot] WARNING in __dma_map_sg_attrs

2022-02-08 Thread Daniel Vetter
On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote: > syzbot has found a reproducer for the following issue on: > > HEAD commit:0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org.. > git tree: upstream > console output:

Re: [PATCH v3 8/8] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity

2022-02-08 Thread Yicong Yang via iommu
On 2022/2/8 19:56, John Garry wrote: > On 08/02/2022 11:21, Yicong Yang wrote: >>> This patch should be earlier in the series, before the PTT driver, and the >>> comment on hisi_ptt_check_iommu_mapping() should mention what is going on >>> here. >>> >> ok I'll reorder the serives and modify the

Re: [PATCH v3 8/8] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity

2022-02-08 Thread John Garry via iommu
On 08/02/2022 11:21, Yicong Yang wrote: This patch should be earlier in the series, before the PTT driver, and the comment on hisi_ptt_check_iommu_mapping() should mention what is going on here. ok I'll reorder the serives and modify the comments of hisi_ptt_check_iommu_mapping() like: /*

Re: [PATCH v5 02/14] driver core: Add dma_cleanup callback in bus_type

2022-02-08 Thread Greg Kroah-Hartman
On Tue, Feb 08, 2022 at 01:55:29PM +0800, Lu Baolu wrote: > Hi Greg, > > On 1/4/22 9:04 PM, Greg Kroah-Hartman wrote: > > On Tue, Jan 04, 2022 at 08:39:11AM -0400, Jason Gunthorpe wrote: > > > On Tue, Jan 04, 2022 at 02:08:36AM -0800, Christoph Hellwig wrote: > > > > All these bus callouts still

Re: [PATCH v3 8/8] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity

2022-02-08 Thread Yicong Yang via iommu
On 2022/2/8 16:05, John Garry wrote: > On 24/01/2022 13:11, Yicong Yang wrote: >> The DMA of HiSilicon PTT device can only work with identical >> mapping. So add a quirk for the device to force the domain >> passthrough. > > This patch should be earlier in the series, before the PTT driver, and

Re: [PATCH v3 6/8] docs: Add HiSilicon PTT device driver documentation

2022-02-08 Thread Yicong Yang via iommu
On 2022/2/7 20:12, Jonathan Cameron wrote: > On Mon, 24 Jan 2022 21:11:16 +0800 > Yicong Yang wrote: > >> Document the introduction and usage of HiSilicon PTT device driver. >> >> Signed-off-by: Yicong Yang > Nice document. A few trivial typos inline. > I would give a RB except I've suggested

Re: [PATCH v3 1/8] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device

2022-02-08 Thread Yicong Yang via iommu
On 2022/2/7 19:42, Jonathan Cameron wrote: > On Mon, 24 Jan 2022 21:11:11 +0800 > Yicong Yang wrote: > >> HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex >> integrated Endpoint(RCiEP) device, providing the capability >> to dynamically monitor and tune the PCIe traffic, and trace

RE: [PATCH] MAINTAINERS: Update maintainer list of DMA MAPPING BENCHMARK

2022-02-08 Thread Song Bao Hua (Barry Song) via iommu
> -Original Message- > From: chenxiang (M) > Sent: Tuesday, February 8, 2022 8:05 PM > To: Song Bao Hua (Barry Song) ; h...@lst.de; > m.szyprow...@samsung.com; robin.mur...@arm.com > Cc: linux...@openeuler.org; Linuxarm ; > iommu@lists.linux-foundation.org;

Re: [PATCH v3 1/8] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device

2022-02-08 Thread Yicong Yang via iommu
Hi John, Thanks for the comments. some replies inline. On 2022/2/8 2:11, John Garry wrote: > On 24/01/2022 13:11, Yicong Yang wrote: >> HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex >> integrated Endpoint(RCiEP) device, providing the capability >> to dynamically monitor and

Re: [PATCH v3 8/8] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity

2022-02-08 Thread John Garry via iommu
On 24/01/2022 13:11, Yicong Yang wrote: The DMA of HiSilicon PTT device can only work with identical mapping. So add a quirk for the device to force the domain passthrough. This patch should be earlier in the series, before the PTT driver, and the comment on hisi_ptt_check_iommu_mapping()