Re: [GIT PULL] IOMMU fixes for -rc5

2020-11-20 Thread pr-tracker-bot
The pull request you sent on Fri, 20 Nov 2020 11:50:35 +: > git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git tags/iommu-fixes has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/fc8299f9f3b9f3b0e1c8c9f719b5deb2a74ab314 Thank you! -- Deet-doot-dot, I am

RE: [PATCH] iommu: Check return of __iommu_attach_device()

2020-11-20 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: 20 November 2020 14:07 > To: Will Deacon ; Shameerali Kolothum Thodi > > Cc: linux-arm-ker...@lists.infradead.org; iommu@lists.linux-foundation.org; > Linuxarm > Subject: Re: [PATCH] iommu: Check return of

Re: [PATCH RESEND 5/5] iommu/tegra-smmu: Add PCI support

2020-11-20 Thread Thierry Reding
On Wed, Nov 11, 2020 at 02:21:29PM -0800, Nicolin Chen wrote: > This patch simply adds support for PCI devices. > > Reviewed-by: Dmitry Osipenko > Tested-by: Dmitry Osipenko > Signed-off-by: Nicolin Chen > --- > drivers/iommu/tegra-smmu.c | 35 +-- > 1 file

Re: [PATCH RESEND 4/5] iommu/tegra-smmu: Rework tegra_smmu_probe_device()

2020-11-20 Thread Thierry Reding
On Wed, Nov 11, 2020 at 02:21:28PM -0800, Nicolin Chen wrote: > The bus_set_iommu() in tegra_smmu_probe() enumerates all clients > to call in tegra_smmu_probe_device() where each client searches > its DT node for smmu pointer and swgroup ID, so as to configure > an fwspec. But this requires a

Re: [PATCH RESEND 3/5] iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

2020-11-20 Thread Thierry Reding
On Wed, Nov 11, 2020 at 02:21:27PM -0800, Nicolin Chen wrote: > In tegra_smmu_(de)attach_dev() functions, we poll DTB for each > client's iommus property to get swgroup ID in order to prepare > "as" and enable smmu. Actually tegra_smmu_configure() prepared > an fwspec for each client, and added to

Re: [PATCH] iommu: Check return of __iommu_attach_device()

2020-11-20 Thread Robin Murphy
On 2020-11-20 11:15, Will Deacon wrote: On Thu, Nov 19, 2020 at 04:58:46PM +, Shameer Kolothum wrote: Currently iommu_create_device_direct_mappings() is called without checking the return of __iommu_attach_device(). This may result in failures in iommu driver if dev attach returns error.

Re: [PATCH v5 0/7] Convert the intel iommu driver to the dma-iommu api

2020-11-20 Thread Lu Baolu
Hi Chris, On 2020/11/20 20:24, Chris Wilson wrote: Quoting Lu Baolu (2020-11-20 10:17:12) Lu Baolu (3): iommu: Add quirk for Intel graphic devices in map_sg iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev iommu/vt-d: Cleanup after converting to dma-iommu ops Tom Murphy

Re: [Patch V8 1/3] iommu: Add support to change default domain of an iommu group

2020-11-20 Thread Lu Baolu
Hi Shameer, On 2020/11/20 19:27, Shameerali Kolothum Thodi wrote: Hi Baolu/Ashok, -Original Message- From: iommu [mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of Ashok Raj Sent: 25 September 2020 20:06 To: Joerg Roedel ; iommu@lists.linux-foundation.org Cc: Ashok Raj ;

Re: [PATCH v5 0/7] Convert the intel iommu driver to the dma-iommu api

2020-11-20 Thread Chris Wilson
Quoting Lu Baolu (2020-11-20 10:17:12) > Lu Baolu (3): > iommu: Add quirk for Intel graphic devices in map_sg > iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev > iommu/vt-d: Cleanup after converting to dma-iommu ops > > Tom Murphy (4): > iommu: Handle freelists when using

[GIT PULL] IOMMU fixes for -rc5

2020-11-20 Thread Will Deacon
Hi Linus, As mentioned at [1], I'm temporarily helping out with the IOMMU tree so here are some fixes I've collected for -rc5, including an update to MAINTAINERS as suggested by Joerg on IRC. Anyway, two straightforward vt-d fixes summarised in the tag. I ended up pulling in some x86 fixes from

Re: [PATCH] iommu: Check return of __iommu_attach_device()

2020-11-20 Thread Will Deacon
On Thu, Nov 19, 2020 at 04:58:46PM +, Shameer Kolothum wrote: > Currently iommu_create_device_direct_mappings() is called > without checking the return of __iommu_attach_device(). This > may result in failures in iommu driver if dev attach returns > error. > > Fixes: ce574c27ae27("iommu: Move

Re: [Patch V8 1/3] iommu: Add support to change default domain of an iommu group

2020-11-20 Thread Will Deacon
On Fri, Nov 20, 2020 at 10:11:58AM +0800, Lu Baolu wrote: > On 11/19/20 4:53 PM, Will Deacon wrote: > > On Thu, Nov 19, 2020 at 10:18:05AM +0800, Lu Baolu wrote: > > > On 11/18/20 9:51 PM, Will Deacon wrote: > > > > On Fri, Sep 25, 2020 at 12:06:18PM -0700, Ashok Raj wrote: > > > > > From: Sai

[PATCH v5 6/7] iommu/vt-d: Convert intel iommu driver to the iommu ops

2020-11-20 Thread Lu Baolu
From: Tom Murphy Convert the intel iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the intel iommu driver. Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe --- drivers/iommu/intel/Kconfig | 1 +

[PATCH v5 7/7] iommu/vt-d: Cleanup after converting to dma-iommu ops

2020-11-20 Thread Lu Baolu
Some cleanups after converting the driver to use dma-iommu ops. - Remove nobounce option; - Cleanup and simplify the path in domain mapping. Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe --- .../admin-guide/kernel-parameters.txt | 5 -- drivers/iommu/intel/iommu.c

[PATCH v5 3/7] iommu: Allow the dma-iommu api to use bounce buffers

2020-11-20 Thread Lu Baolu
From: Tom Murphy Allow the dma-iommu api to use bounce buffers for untrusted devices. This is a copy of the intel bounce buffer code. Signed-off-by: Tom Murphy Co-developed-by: Lu Baolu Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe --- drivers/iommu/dma-iommu.c | 163

[PATCH v5 5/7] iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev

2020-11-20 Thread Lu Baolu
The iommu-dma constrains IOVA allocation based on the domain geometry that the driver reports. Update domain geometry everytime a domain is attached to or detached from a device. Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe --- drivers/iommu/intel/iommu.c | 16 ++-- 1 file

[PATCH v5 4/7] iommu: Add quirk for Intel graphic devices in map_sg

2020-11-20 Thread Lu Baolu
Combining the sg segments exposes a bug in the Intel i915 driver which causes visual artifacts and the screen to freeze. This is most likely because of how the i915 handles the returned list. It probably doesn't respect the returned value specifying the number of elements in the list and instead

[PATCH v5 0/7] Convert the intel iommu driver to the dma-iommu api

2020-11-20 Thread Lu Baolu
Hi Will, The previous post of this series could be found here. https://lore.kernel.org/linux-iommu/20200927063437.13988-1-baolu...@linux.intel.com/ Changes in this version: - Add Tested-by: Logan Gunthorpe - Rebase to v5.10-rc3 Please review and consider it for iommu/next. Best regards,

[PATCH v5 2/7] iommu: Add iommu_dma_free_cpu_cached_iovas()

2020-11-20 Thread Lu Baolu
From: Tom Murphy Add a iommu_dma_free_cpu_cached_iovas function to allow drivers which use the dma-iommu ops to free cached cpu iovas. Signed-off-by: Tom Murphy Signed-off-by: Lu Baolu Tested-by: Logan Gunthorpe --- drivers/iommu/dma-iommu.c | 9 + include/linux/dma-iommu.h | 8

Re: [PATCH v4 0/7] Convert the intel iommu driver to the dma-iommu api

2020-11-20 Thread Lu Baolu
On 2020/11/3 18:54, Joerg Roedel wrote: Hi, On Tue, Nov 03, 2020 at 11:58:26AM +0200, Joonas Lahtinen wrote: Would that work for you? We intend to send the feature pull requests to DRM for 5.11 in the upcoming weeks. For the IOMMU side it is best to include the workaround for now. When the

[PATCH] iommu: Improve the performance for direct_mapping

2020-11-20 Thread Yong Wu
Currently direct_mapping always use the smallest pgsize which is SZ_4K normally to mapping. This is unnecessary. we could gather the size, and call iommu_map then, iommu_map could decide how to map better with the just right pgsize. >From the original comment, we should take care overlap,