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

2021-03-25 Thread Robin Murphy
On 2021-03-25 09:43, Will Deacon wrote: [+ Joerg] On Thu, Mar 25, 2021 at 11:38:24AM +0800, chenxiang wrote: 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

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

2021-03-25 Thread Sven Peter via iommu
On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: > > > Date: Sat, 20 Mar 2021 15:19:33 + > > > From: Sven Peter > > > I have just noticed today though that at least the USB DWC3 controller in > > > host > > > mode uses

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

2021-03-25 Thread Jean-Philippe Brucker
On Wed, Mar 24, 2021 at 10:02:46AM -0700, Jacob Pan wrote: > > And a flag IOMMU_SVA_BIND_SUPERVISOR (not that I plan to implement it in > > the SMMU, but I think we need to clean the current usage) > > > You mean move #define SVM_FLAG_SUPERVISOR_MODE out of Intel code to be a > generic flag in

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

2021-03-25 Thread Will Deacon
[+ Joerg] On Thu, Mar 25, 2021 at 11:38:24AM +0800, chenxiang wrote: > 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)

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

2021-03-25 Thread Jean-Philippe Brucker
On Wed, Mar 24, 2021 at 03:12:30PM -0700, Jacob Pan wrote: > 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

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

2021-03-25 Thread Will Deacon
On Thu, Mar 25, 2021 at 10:48:17AM +, Robin Murphy wrote: > On 2021-03-25 09:43, Will Deacon wrote: > > [+ Joerg] > > > > On Thu, Mar 25, 2021 at 11:38:24AM +0800, chenxiang wrote: > > > From: Xiang Chen > > > > > > After the change of patch ("iommu: Switch gather->end to the > > >

Re: [PATCH 15/17] iommu: remove DOMAIN_ATTR_NESTING

2021-03-25 Thread Christoph Hellwig
On Thu, Mar 25, 2021 at 06:12:37AM +, Tian, Kevin wrote: > Agree. The vSVA series is still undergoing a refactor according to Jason's > comment thus won't be ready in short term. It's better to let this one > go in first. Would be great to get a few more reviews while we're at it :)

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-03-25 Thread Sai Prakash Ranjan
Hi Will, On 2021-03-15 00:31, Sai Prakash Ranjan wrote: On 2021-03-12 04:59, Bjorn Andersson wrote: On Sat 27 Feb 07:53 CST 2021, Sai Prakash Ranjan wrote: Hi Bjorn, On 2021-02-27 00:44, Bjorn Andersson wrote: > On Fri 26 Feb 12:23 CST 2021, Rob Clark wrote: > > > The current logic picks

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

2021-03-25 Thread Sven Peter via iommu
Hi Robin, On Wed, Mar 24, 2021, at 16:29, Robin Murphy wrote: > On 2021-03-20 15:19, Sven Peter wrote: > > > > I have just noticed today though that at least the USB DWC3 controller in > > host > > mode uses *two* darts at the same time. I'm not sure yet which parts seem to > > require which

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

2021-03-25 Thread Jon Nettleton
On Mon, Mar 22, 2021 at 11:37 AM Shameerali Kolothum Thodi wrote: > > [+] > > Hi Erik, > > As this is now just merged ino acpica-master and based on the discussion we > had here, > > https://github.com/acpica/acpica/pull/638 > > I had a discussion with ARM folks(Lorenzo) in the

[PATCH 3/9] memory: tegra: Implement SID override programming

2021-03-25 Thread Thierry Reding
From: Thierry Reding Instead of programming all SID overrides during early boot, perform the operation on-demand after the SMMU translations have been set up for a device. This reuses data from device tree to match memory clients for a device and programs the SID specified in device tree, which

[PATCH 2/9] memory: tegra: Add memory client IDs to tables

2021-03-25 Thread Thierry Reding
From: Thierry Reding The memory client IDs will subsequently be used to program override SIDs for the given clients depending on the device tree configuration. Signed-off-by: Thierry Reding --- drivers/memory/tegra/tegra186.c | 206 1 file changed, 206

[PATCH 4/9] iommu/arm-smmu: Implement ->probe_finalize()

2021-03-25 Thread Thierry Reding
From: Thierry Reding Implement a ->probe_finalize() callback that can be used by vendor implementations to perform extra programming necessary after devices have been attached to the SMMU. Signed-off-by: Thierry Reding --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 17 +

[PATCH 5/9] iommu/arm-smmu: tegra: Detect number of instances at runtime

2021-03-25 Thread Thierry Reding
From: Thierry Reding Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional programming is needed to properly configure the

[PATCH 6/9] iommu/arm-smmu: tegra: Implement SID override programming

2021-03-25 Thread Thierry Reding
From: Thierry Reding The secure firmware keeps some SID override registers set as passthrough in order to allow devices such as the display controller to operate with no knowledge of SMMU translations until an operating system driver takes over. This is needed in order to seamlessly transition

Re: [PATCH 1/1] iommu: Don't use lazy flush for untrusted device

2021-03-25 Thread Will Deacon
On Thu, Feb 25, 2021 at 02:14:54PM +0800, Lu Baolu wrote: > The lazy IOTLB flushing setup leaves a time window, in which the device > can still access some system memory, which has already been unmapped by > the device driver. It's not suitable for untrusted devices. A malicious > device might use

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

2021-03-25 Thread Robin Murphy
On 2021-03-25 07:53, Sven Peter wrote: On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: Date: Sat, 20 Mar 2021 15:19:33 + From: Sven Peter I have just noticed today though that at least the USB DWC3 controller in host mode

Re: [PATCH v2 3/4] iommu: Delete iommu_dma_free_cpu_cached_iovas()

2021-03-25 Thread Robin Murphy
On 2021-03-25 12:30, John Garry wrote: Function iommu_dma_free_cpu_cached_iovas() no longer has any caller, so delete it. With that, function free_cpu_cached_iovas() may be made static. Reviewed-by: Robin Murphy Signed-off-by: John Garry --- drivers/iommu/dma-iommu.c | 9 -

Re: [PATCH v2 4/4] iommu: Stop exporting free_iova_fast()

2021-03-25 Thread Robin Murphy
On 2021-03-25 12:30, John Garry wrote: Function free_iova_fast() is only referenced by dma-iommu.c, which can only be in-built, so stop exporting it. This was missed in an earlier tidy-up patch. Reviewed-by: Robin Murphy Signed-off-by: John Garry --- drivers/iommu/iova.c | 1 - 1 file

Re: [PATCH 3/9] memory: tegra: Implement SID override programming

2021-03-25 Thread Robin Murphy
On 2021-03-25 13:03, Thierry Reding wrote: From: Thierry Reding Instead of programming all SID overrides during early boot, perform the operation on-demand after the SMMU translations have been set up for a device. This reuses data from device tree to match memory clients for a device and

Re: [PATCH 7/9] iommu/arm-smmu: Use Tegra implementation on Tegra186

2021-03-25 Thread Robin Murphy
On 2021-03-25 13:03, Thierry Reding wrote: From: Thierry Reding Tegra186 requires the same SID override programming as Tegra194 in order to seamlessly transition from the firmware framebuffer to the Linux framebuffer, so the Tegra implementation needs to be used on Tegra186 devices as well.

Re: [PATCH 5/9] iommu/arm-smmu: tegra: Detect number of instances at runtime

2021-03-25 Thread Robin Murphy
On 2021-03-25 13:03, Thierry Reding wrote: From: Thierry Reding Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional

Re: [PATCH 4/9] iommu/arm-smmu: Implement ->probe_finalize()

2021-03-25 Thread Robin Murphy
On 2021-03-25 13:03, Thierry Reding wrote: From: Thierry Reding Implement a ->probe_finalize() callback that can be used by vendor implementations to perform extra programming necessary after devices have been attached to the SMMU. Signed-off-by: Thierry Reding ---

Re: [PATCH 3/9] memory: tegra: Implement SID override programming

2021-03-25 Thread Thierry Reding
On Thu, Mar 25, 2021 at 02:27:10PM +, Robin Murphy wrote: > On 2021-03-25 13:03, Thierry Reding wrote: > > From: Thierry Reding > > > > Instead of programming all SID overrides during early boot, perform the > > operation on-demand after the SMMU translations have been set up for a > >

Re: [RFC PATCH 5/7] iommu/amd: Add support for Guest IO protection

2021-03-25 Thread Suravee Suthikulpanit
Joerg, On 3/18/21 10:31 PM, Joerg Roedel wrote: On Fri, Mar 12, 2021 at 03:04:09AM -0600, Suravee Suthikulpanit wrote: @@ -519,6 +521,7 @@ struct protection_domain { spinlock_t lock;/* mostly used to lock the page table*/ u16 id; /* the domain id written

Re: [PATCH 1/9] memory: tegra: Move internal data structures into separate header

2021-03-25 Thread Dmitry Osipenko
25.03.2021 16:03, Thierry Reding пишет: > From: Thierry Reding > > From Tegra20 through Tegra210, either the GART or SMMU drivers need > access to the internals of the memory controller driver because they are > tightly coupled (in fact, the GART and SMMU are part of the memory > controller). On

[PATCH v2 4/4] iommu: Stop exporting free_iova_fast()

2021-03-25 Thread John Garry
Function free_iova_fast() is only referenced by dma-iommu.c, which can only be in-built, so stop exporting it. This was missed in an earlier tidy-up patch. Signed-off-by: John Garry --- drivers/iommu/iova.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/iova.c

[PATCH v2 3/4] iommu: Delete iommu_dma_free_cpu_cached_iovas()

2021-03-25 Thread John Garry
Function iommu_dma_free_cpu_cached_iovas() no longer has any caller, so delete it. With that, function free_cpu_cached_iovas() may be made static. Signed-off-by: John Garry --- drivers/iommu/dma-iommu.c | 9 - drivers/iommu/iova.c | 3 ++- include/linux/dma-iommu.h | 8

[PATCH v2 2/4] iommu/vt-d: Remove IOVA domain rcache flushing for CPU offlining

2021-03-25 Thread John Garry
Now that the core code handles flushing per-IOVA domain CPU rcaches, remove the handling here. Reviewed-by: Lu Baolu Signed-off-by: John Garry --- drivers/iommu/intel/iommu.c | 31 --- include/linux/cpuhotplug.h | 1 - 2 files changed, 32 deletions(-) diff --git

[PATCH v2 1/4] iova: Add CPU hotplug handler to flush rcaches

2021-03-25 Thread John Garry
Like the Intel IOMMU driver already does, flush the per-IOVA domain CPU rcache when a CPU goes offline - there's no point in keeping it. Reviewed-by: Robin Murphy Signed-off-by: John Garry --- drivers/iommu/iova.c | 30 +- include/linux/cpuhotplug.h | 1 +

[PATCH v2 0/4] iommu/iova: Add CPU hotplug handler to flush rcaches to core code

2021-03-25 Thread John Garry
The Intel IOMMU driver supports flushing the per-CPU rcaches when a CPU is offlined. Let's move it to core code, so everyone can take advantage. Also throw in a patch to stop exporting free_iova_fast(). Differences to v1: - Add RB tags (thanks!) - Add patch to stop exporting free_iova_fast() -

[PATCH 7/9] iommu/arm-smmu: Use Tegra implementation on Tegra186

2021-03-25 Thread Thierry Reding
From: Thierry Reding Tegra186 requires the same SID override programming as Tegra194 in order to seamlessly transition from the firmware framebuffer to the Linux framebuffer, so the Tegra implementation needs to be used on Tegra186 devices as well. Signed-off-by: Thierry Reding ---

[PATCH 8/9] arm64: tegra: Hook up memory controller to SMMU on Tegra186

2021-03-25 Thread Thierry Reding
From: Thierry Reding On Tegra186 and later, the memory controller needs to be programmed in coordination with any of the ARM SMMU instances to configure the stream ID used for each memory client. To support this, add a phandle reference to the memory controller to the SMMU device tree node.

[PATCH 9/9] arm64: tegra: Enable SMMU support on Tegra194

2021-03-25 Thread Thierry Reding
From: Thierry Reding Add the device tree node for the dual-SMMU found on Tegra194 and hook up peripherals such as host1x, BPMP, HDA, SDMMC, EQOS and VIC. Signed-off-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 86 1 file changed, 86 insertions(+)

[PATCH 1/9] memory: tegra: Move internal data structures into separate header

2021-03-25 Thread Thierry Reding
From: Thierry Reding >From Tegra20 through Tegra210, either the GART or SMMU drivers need access to the internals of the memory controller driver because they are tightly coupled (in fact, the GART and SMMU are part of the memory controller). On later chips, a separate hardware block implements

[PATCH 0/9] arm64: tegra: Prevent early SMMU faults

2021-03-25 Thread Thierry Reding
From: Thierry Reding Hi, this is a set of patches that is the result of earlier discussions regarding early identity mappings that are needed to avoid SMMU faults during early boot. The goal here is to avoid early identity mappings altogether and instead postpone the need for the identity

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-03-25 Thread Will Deacon
On Thu, Mar 25, 2021 at 01:10:12PM +0530, Sai Prakash Ranjan wrote: > On 2021-03-15 00:31, Sai Prakash Ranjan wrote: > > On 2021-03-12 04:59, Bjorn Andersson wrote: > > > On Sat 27 Feb 07:53 CST 2021, Sai Prakash Ranjan wrote: > > > > On 2021-02-27 00:44, Bjorn Andersson wrote: > > > > > On Fri 26

Re: [PATCH 1/9] memory: tegra: Move internal data structures into separate header

2021-03-25 Thread Thierry Reding
On Thu, Mar 25, 2021 at 06:12:51PM +0300, Dmitry Osipenko wrote: > 25.03.2021 16:03, Thierry Reding пишет: > > From: Thierry Reding > > > > From Tegra20 through Tegra210, either the GART or SMMU drivers need > > access to the internals of the memory controller driver because they are > > tightly

Re: [PATCH 2/3] iommu/io-pgtable-arm: Add IOMMU_LLC page protection flag

2021-03-25 Thread Will Deacon
On Tue, Mar 09, 2021 at 12:10:44PM +0530, Sai Prakash Ranjan wrote: > On 2021-02-05 17:38, Sai Prakash Ranjan wrote: > > On 2021-02-04 03:16, Will Deacon wrote: > > > On Tue, Feb 02, 2021 at 11:56:27AM +0530, Sai Prakash Ranjan wrote: > > > > On 2021-02-01 23:50, Jordan Crouse wrote: > > > > > On

Re: [PATCH 1/9] memory: tegra: Move internal data structures into separate header

2021-03-25 Thread Dmitry Osipenko
25.03.2021 18:52, Thierry Reding пишет: > On Thu, Mar 25, 2021 at 06:12:51PM +0300, Dmitry Osipenko wrote: >> 25.03.2021 16:03, Thierry Reding пишет: >>> From: Thierry Reding >>> >>> From Tegra20 through Tegra210, either the GART or SMMU drivers need >>> access to the internals of the memory

Re: [PATCH v2 0/4] iommu/iova: Add CPU hotplug handler to flush rcaches to core code

2021-03-25 Thread Will Deacon
On Thu, Mar 25, 2021 at 08:29:57PM +0800, John Garry wrote: > The Intel IOMMU driver supports flushing the per-CPU rcaches when a CPU is > offlined. > > Let's move it to core code, so everyone can take advantage. > > Also throw in a patch to stop exporting free_iova_fast(). > > Differences to

Re: [Patch V2 07/13] irqdomain/msi: Provide msi_alloc/free_store() callbacks

2021-03-25 Thread Marc Zyngier
On Fri, 26 Feb 2021 20:11:11 +, Megha Dey wrote: > > From: Thomas Gleixner > > For devices which don't have a standard storage for MSI messages like the > upcoming IMS (Interrupt Message Store) it's required to allocate storage > space before allocating interrupts and after freeing them. >

Re: [PATCH 1/2] iommu: Statically set module owner

2021-03-25 Thread Will Deacon
On Fri, Mar 19, 2021 at 12:52:01PM +, Robin Murphy wrote: > It happens that the 3 drivers which first supported being modular are > also ones which play games with their pgsize_bitmap, so have non-const > iommu_ops where dynamically setting the owner manages to work out OK. > However, it's

Re: [Patch V2 08/13] genirq: Set auxiliary data for an interrupt

2021-03-25 Thread Marc Zyngier
On Fri, 26 Feb 2021 20:11:12 +, Megha Dey wrote: > > Introduce a new function pointer in the irq_chip structure(irq_set_auxdata) > which is responsible for updating data which is stored in a shared register > or data storage. For example, the idxd driver uses the auxiliary data API > to

Re: [PATCH v13 02/10] iommu/arm-smmu-v3: Use device properties for pasid-num-bits

2021-03-25 Thread Will Deacon
On Tue, Mar 02, 2021 at 10:26:38AM +0100, Jean-Philippe Brucker wrote: > The pasid-num-bits property shouldn't need a dedicated fwspec field, > it's a job for device properties. Add properties for IORT, and access > the number of PASID bits using device_property_read_u32(). > > Suggested-by:

Re: [PATCH v13 01/10] iommu: Fix comment for struct iommu_fwspec

2021-03-25 Thread Will Deacon
On Tue, Mar 02, 2021 at 10:26:37AM +0100, Jean-Philippe Brucker wrote: > Commit 986d5ecc5699 ("iommu: Move fwspec->iommu_priv to struct > dev_iommu") removed iommu_priv from fwspec and commit 5702ee24182f > ("ACPI/IORT: Check ATS capability in root complex nodes") added @flags. > Update the struct

Re: [PATCH v13 07/10] iommu/arm-smmu-v3: Maintain a SID->device structure

2021-03-25 Thread Will Deacon
On Tue, Mar 02, 2021 at 10:26:43AM +0100, Jean-Philippe Brucker wrote: > When handling faults from the event or PRI queue, we need to find the > struct device associated with a SID. Add a rb_tree to keep track of > SIDs. > > Acked-by: Jonathan Cameron > Reviewed-by: Eric Auger > Signed-off-by:

Re: [Patch V2 13/13] genirq/msi: Provide helpers to return Linux IRQ/dev_msi hw IRQ number

2021-03-25 Thread Marc Zyngier
On Fri, 26 Feb 2021 20:11:17 +, Megha Dey wrote: > > From: Dave Jiang > > Add new helpers to get the Linux IRQ number and device specific index > for given device-relative vector so that the drivers don't need to > allocate their own arrays to keep track of the vectors and hwirq for > the

Re: [PATCH] dt-bindings: arm-smmu: Add compatible for SC7280 SoC

2021-03-25 Thread Will Deacon
On Mon, 15 Mar 2021 11:32:24 +0530, Rajendra Nayak wrote: > Add the SoC specific compatible for SC7280 implementing > arm,mmu-500. Applied to will (for-joerg/arm-smmu/updates), thanks! [1/1] dt-bindings: arm-smmu: Add compatible for SC7280 SoC https://git.kernel.org/will/c/a9aa2bb18ecb

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

2021-03-25 Thread Will Deacon
On Wed, 24 Mar 2021 16:16:03 +0800, Zhen Lei wrote: > 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

Re: [Patch V2 07/13] irqdomain/msi: Provide msi_alloc/free_store() callbacks

2021-03-25 Thread Thomas Gleixner
On Thu, Mar 25 2021 at 17:08, Marc Zyngier wrote: > Megha Dey wrote: >> @@ -434,6 +434,12 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, >> struct device *dev, >> if (ret) >> return ret; >> >> +if (ops->msi_alloc_store) { >> +ret =

Re: [PATCH 1/2] iommu/mediatek-v1: Alloc building as module

2021-03-25 Thread Robin Murphy
^^Nit: presumably you meant "Allow" in the subject. On 2021-03-25 17:16, Will Deacon wrote: On Tue, Mar 23, 2021 at 01:58:00PM +0800, Yong Wu wrote: This patch only adds support for building the IOMMU-v1 driver as module. Correspondingly switch the config to tristate. Signed-off-by: Yong Wu

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

2021-03-25 Thread Jacob Pan
Hi Jason, On Thu, 25 Mar 2021 14:16:45 -0300, Jason Gunthorpe wrote: > On Thu, Mar 25, 2021 at 10:02:36AM -0700, Jacob Pan wrote: > > Hi Jean-Philippe, > > > > On Thu, 25 Mar 2021 11:21:40 +0100, Jean-Philippe Brucker > > wrote: > > > > > On Wed, Mar 24, 2021 at 03:12:30PM -0700, Jacob Pan

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

2021-03-25 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Jon Nettleton [mailto:j...@solid-run.com] > Sent: 25 March 2021 08:40 > To: Shameerali Kolothum Thodi > Cc: erik.kan...@intel.com; linux-arm-ker...@lists.infradead.org; > linux-a...@vger.kernel.org; iommu@lists.linux-foundation.org; > de...@acpica.org;

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

2021-03-25 Thread Jacob Pan
Hi Jean-Philippe, On Thu, 25 Mar 2021 11:21:40 +0100, Jean-Philippe Brucker wrote: > On Wed, Mar 24, 2021 at 03:12:30PM -0700, Jacob Pan wrote: > > 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

Re: [PATCH 2/2] iommu: Streamline registration interface

2021-03-25 Thread Will Deacon
On Fri, Mar 19, 2021 at 12:52:02PM +, Robin Murphy wrote: > Rather than have separate opaque setter functions that are easy to > overlook and lead to repetitive boilerplate in drivers, let's pass the > relevant initialisation parameters directly to iommu_device_register(). > > Signed-off-by:

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

2021-03-25 Thread Jason Gunthorpe
On Thu, Mar 25, 2021 at 10:02:36AM -0700, Jacob Pan wrote: > Hi Jean-Philippe, > > On Thu, 25 Mar 2021 11:21:40 +0100, Jean-Philippe Brucker > wrote: > > > On Wed, Mar 24, 2021 at 03:12:30PM -0700, Jacob Pan wrote: > > > Hi Jason, > > > > > > On Wed, 24 Mar 2021 14:03:38 -0300, Jason Gunthorpe

Re: [PATCH 1/2] iommu/mediatek-v1: Alloc building as module

2021-03-25 Thread Will Deacon
On Tue, Mar 23, 2021 at 01:58:00PM +0800, Yong Wu wrote: > This patch only adds support for building the IOMMU-v1 driver as module. > Correspondingly switch the config to tristate. > > Signed-off-by: Yong Wu > --- > rebase on v5.12-rc2. > --- > drivers/iommu/Kconfig| 2 +- >

Re: [Patch V2 12/13] irqchip: Add IMS (Interrupt Message Store) driver

2021-03-25 Thread Marc Zyngier
On Fri, 26 Feb 2021 20:11:16 +, Megha Dey wrote: > > Generic IMS(Interrupt Message Store) irq chips and irq domain > implementations for IMS based devices which store the interrupt messages > in an array in device memory. > > Allocation and freeing of interrupts happens via the generic >

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

2021-03-25 Thread Sven Peter via iommu
Hi Robin, Thanks for the review! On Wed, Mar 24, 2021, at 17:37, Robin Murphy wrote: > 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

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

2021-03-25 Thread Sven Peter via iommu
On Thu, Mar 25, 2021, at 12:50, Robin Murphy wrote: > On 2021-03-25 07:53, Sven Peter wrote: > > > > > > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > >> On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: > >>> > >>> As I mentioned before, not all DARTs support the full

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

2021-03-25 Thread Arnd Bergmann
On Thu, Mar 25, 2021 at 8:53 AM Sven Peter wrote: > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > > I'm probably just confused or maybe the documentation is outdated but I don't > see how I could specify "this device can only use DMA addresses from > 0x0010...0x3ff0 but can map

Re: [Patch V2 08/13] genirq: Set auxiliary data for an interrupt

2021-03-25 Thread Thomas Gleixner
On Thu, Mar 25 2021 at 17:23, Marc Zyngier wrote: >> +/** >> + * irq_set_auxdata - Set auxiliary data >> + * @irq:Interrupt to update >> + * @which: Selector which data to update >> + * @auxval: Auxiliary data value >> + * >> + * Function to update auxiliary data for an interrupt, e.g. to

Re: [Patch V2 12/13] irqchip: Add IMS (Interrupt Message Store) driver

2021-03-25 Thread Thomas Gleixner
On Thu, Mar 25 2021 at 17:43, Marc Zyngier wrote: > On Fri, 26 Feb 2021 20:11:16 +, > Megha Dey wrote: >> + >> +#include >> + >> +#ifdef CONFIG_IMS_MSI_ARRAY > > Given that this covers the whole driver, what is this #defined used > for? You might as well make the driver depend on this config

[PATCH v2 2/2] iommu/mediatek: Allow building as module

2021-03-25 Thread Yong Wu
The IOMMU in many SoC depends on the MM clocks and power-domain which are device_initcall normally, thus the subsys_init here is not helpful. This patch switches it to module_platform_driver which also allow the driver built as module. Correspondingly switch the config to tristate, and update the

[PATCH v2 1/2] iommu/mediatek-v1: Allow building as module

2021-03-25 Thread Yong Wu
This patch only adds support for building the IOMMU-v1 driver as module. Correspondingly switch the config to tristate and update the iommu_ops's owner to THIS_MODULE. Signed-off-by: Yong Wu --- v2: change note: a) Update iommu_ops's owner to THIS_MODULE b) Fix typo in the title from

Re: [Patch V2 12/13] irqchip: Add IMS (Interrupt Message Store) driver

2021-03-25 Thread Dey, Megha
Hi Thomas/Marc, On 3/25/2021 12:07 PM, Thomas Gleixner wrote: On Thu, Mar 25 2021 at 17:43, Marc Zyngier wrote: On Fri, 26 Feb 2021 20:11:16 +, Megha Dey wrote: + +#include + +#ifdef CONFIG_IMS_MSI_ARRAY Given that this covers the whole driver, what is this #defined used for? You might

Re: [Patch V2 13/13] genirq/msi: Provide helpers to return Linux IRQ/dev_msi hw IRQ number

2021-03-25 Thread Dey, Megha
Hi Marc, On 3/25/2021 10:53 AM, Marc Zyngier wrote: On Fri, 26 Feb 2021 20:11:17 +, Megha Dey wrote: From: Dave Jiang Add new helpers to get the Linux IRQ number and device specific index for given device-relative vector so that the drivers don't need to allocate their own arrays to

RE: [PATCH 15/17] iommu: remove DOMAIN_ATTR_NESTING

2021-03-25 Thread Tian, Kevin
> From: Auger Eric > Sent: Monday, March 15, 2021 3:52 PM > To: Christoph Hellwig > Cc: k...@vger.kernel.org; Will Deacon ; linuxppc- > d...@lists.ozlabs.org; dri-de...@lists.freedesktop.org; Li Yang > ; iommu@lists.linux-foundation.org; > > Hi Christoph, > > On 3/14/21 4:58 PM, Christoph