[PATCH 05/13] iommu/arm-smmu-v3: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the probe failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 53 + 1 file changed, 2 insertions(+), 51 deletions(-) diff --git

[PATCH 07/13] iommu/exynos: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the init failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/exynos-iommu.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index

[PATCH 06/13] iommu/dart: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the probe failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/apple-dart.c | 30 +- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/drivers/iommu/apple-dart.c

[PATCH 11/13] iommu/tegra-smmu: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the probe failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/tegra-smmu.c | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/drivers/iommu/tegra-smmu.c

[PATCH 12/13] iommu/virtio: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the probe failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/virtio-iommu.c | 24 1 file changed, 24 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c

[PATCH 13/13] iommu: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Clean up the remaining trivial bus_set_iommu() callsites along with the implementation. Now drivers only have to know and care about iommu_device instances, phew! Signed-off-by: Robin Murphy --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 4 drivers/iommu/fsl_pamu_domain.c | 4

[PATCH 08/13] iommu/ipmmu-vmsa: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary. This also leaves the custom initcall effectively doing nothing but register the driver, which no longer needs to happen early either, so convert it to builtin_platform_driver(). Signed-off-by: Robin Murphy --- drivers/iommu/ipmmu-vmsa.c |

[PATCH 09/13] iommu/mtk: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the probe failure paths accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/mtk_iommu.c| 13 + drivers/iommu/mtk_iommu_v1.c | 13 + 2 files changed, 2 insertions(+), 24 deletions(-) diff

[PATCH 10/13] iommu/omap: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and simplify the init failure path accordingly. Signed-off-by: Robin Murphy --- drivers/iommu/omap-iommu.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index

Re: [PATCH v7 0/7] Add support for HiSilicon PCIe Tune and Trace device

2022-04-14 Thread Yicong Yang via iommu
Hi Bjorn, Since it's a device about tuning and analyzing PCIe link in your realm and you've given helpful comments in RFC and v1 version, looking forward to see your opnion on this driver as the user interface has changed to perf. Also to confirm that the hotplug problem mentioned in RFC[1]

[PATCH 4.19 165/338] dma-debug: fix return value of __setup handlers

2022-04-14 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit 80e4390981618e290616dbd06ea190d4576f219d ] When valid kernel command line parameters dma_debug=off dma_debug_entries=100 are used, they are reported as Unknown parameters and added to init's environment strings, polluting it. Unknown kernel command line

[PATCH 5.4 238/475] dma-debug: fix return value of __setup handlers

2022-04-14 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit 80e4390981618e290616dbd06ea190d4576f219d ] When valid kernel command line parameters dma_debug=off dma_debug_entries=100 are used, they are reported as Unknown parameters and added to init's environment strings, polluting it. Unknown kernel command line

Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver

2022-04-14 Thread John Garry via iommu
On 12/04/2022 08:41, Yicong Yang wrote: +    hisi_ptt_pmus = zalloc(sizeof(struct perf_pmu *) * (*nr_ptts)); +    if (!hisi_ptt_pmus) { +    pr_err("hisi_ptt alloc failed\n"); +    *err = -ENOMEM; using PTR_ERR seems better, if possible ok will change to that. *err = -ENOMEM is used

Re: [PATCH v2] habanalabs: Stop using iommu_present()

2022-04-14 Thread Oded Gabbay
On Mon, Apr 11, 2022 at 3:36 PM Robin Murphy wrote: > > Even if an IOMMU might be present for some PCI segment in the system, > that doesn't necessarily mean it provides translation for the device > we care about. Replace iommu_present() with a more appropriate check. > > Signed-off-by: Robin

[PATCH 01/13] iommu: Always register bus notifiers

2022-04-14 Thread Robin Murphy
The number of bus types that the IOMMU subsystem deals with is small and manageable, so pull that list into core code as a first step towards cleaning up all the boilerplate bus-awareness from drivers. Calling iommu_probe_device() before bus->iommu_ops is set will simply return -ENODEV and not

[PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-14 Thread Robin Murphy
Move the bus setup to iommu_device_register(). This should allow bus_iommu_probe() to be correctly replayed for multiple IOMMU instances, and leaves bus_set_iommu() as a glorfied no-op to be cleaned up next. Note that although the handling of errors from bus_iommu_probe() looks inadequate, it is

[PATCH 04/13] iommu/arm-smmu: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary. With device probes now replayed for every IOMMU instance registration, the whole sorry ordering workaround for legacy DT bindings goes too, hooray! Signed-off-by: Robin Murphy --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 84

[PATCH 03/13] iommu/amd: Clean up bus_set_iommu()

2022-04-14 Thread Robin Murphy
Stop calling bus_set_iommu() since it's now unnecessary, and garbage-collect the last remnants of amd_iommu_init_api(). Signed-off-by: Robin Murphy --- drivers/iommu/amd/amd_iommu.h | 1 - drivers/iommu/amd/init.c | 9 + drivers/iommu/amd/iommu.c | 21 - 3

[PATCH 00/13] iommu: Retire bus_set_iommu()

2022-04-14 Thread Robin Murphy
Hi all, Here's another chapter in my saga of moving to per-instance IOMMU ops - iommu_present() and iommu_capable() cleanups will be ongoing for another cycle or two, while this one is at least self-contained within the subsystem. The next steps after this are making iommu_domain_alloc()

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

2022-04-14 Thread zhangfei....@foxmail.com
On 2022/4/12 下午11:35, zhangfei@foxmail.com wrote: Hi, Fenghua On 2022/4/12 下午9:41, Fenghua Yu wrote: Hi, Zhangfei, On Tue, Apr 12, 2022 at 03:04:09PM +0800, zhangfei@foxmail.com wrote: On 2022/4/11 下午10:52, Dave Hansen wrote: On 4/11/22 07:44, zhangfei@foxmail.com wrote: On

Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range

2022-04-14 Thread Robin Murphy
On 2022-04-13 21:19, Nicolin Chen wrote: Hi Robin, On Wed, Apr 13, 2022 at 02:40:31PM +0100, Robin Murphy wrote: On 2022-04-13 05:17, Nicolin Chen wrote: To calculate num_pages, the size should be aligned with "page size", determined by the tg value. Otherwise, its following "while (iova <

Re: [PATCH RFC 00/12] IOMMUFD Generic interface

2022-04-14 Thread Yi Liu
On 2022/3/19 01:27, Jason Gunthorpe wrote: iommufd is the user API to control the IOMMU subsystem as it relates to managing IO page tables that point at user space memory. It takes over from drivers/vfio/vfio_iommu_type1.c (aka the VFIO container) which is the VFIO specific interface for a

Re: [PATCH 00/13] iommu: Retire bus_set_iommu()

2022-04-14 Thread Marek Szyprowski
Hi Robin, On 14.04.2022 14:42, Robin Murphy wrote: > Hi all, > > Here's another chapter in my saga of moving to per-instance IOMMU ops - > iommu_present() and iommu_capable() cleanups will be ongoing for another > cycle or two, while this one is at least self-contained within the > subsystem. The

Re: [PATCH v5 1/2] PCI: ACPI: Support Microsoft's "DmaProperty"

2022-04-14 Thread Rajat Jain via iommu
Hello Bjorn, On Thu, Apr 7, 2022 at 12:17 PM Bjorn Helgaas wrote: > > In subject, > > PCI/ACPI: ... > > would be consistent with previous history (at least things coming > through the PCI tree :)). Will do. > > On Fri, Mar 25, 2022 at 11:46:08AM -0700, Rajat Jain wrote: > > The

Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range

2022-04-14 Thread Nicolin Chen via iommu
On Thu, Apr 14, 2022 at 11:32:38AM +0100, Robin Murphy wrote: > External email: Use caution opening links or attachments > > > On 2022-04-13 21:19, Nicolin Chen wrote: > > Hi Robin, > > > > On Wed, Apr 13, 2022 at 02:40:31PM +0100, Robin Murphy wrote: > > > On 2022-04-13 05:17, Nicolin Chen