[PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-13 Thread Nicolin Chen
This patch dumps all active mapping entries from pagetable to a debugfs directory named "mappings". Attaching an example: SWGROUP: hc as->id: 0 as->attr: R|W|N as->pd_dma: 0x80c03000 { [index: 1023] 0xf0080c3e (count: 2) { PTE RANGE | ATTR | PHYS

[PATCH v6 5/6] iommu/tegra-smmu: Attach as pointer to tegra_smmu_group

2021-09-13 Thread Nicolin Chen
This could ease driver to access corresponding as pointer when having tegra_smmu_group pointer only, which can help new mappings debugfs nodes. Also moving tegra_smmu_find_group_soc() upward, for using it in new tegra_smmu_attach_as(); and it's better to have all tegra_smmu_find_* functions togeth

[PATCH v6 4/6] iommu/tegra-smmu: Use swgrp pointer instead of swgroup id

2021-09-13 Thread Nicolin Chen
This patch changes in struct tegra_smmu_group to use swgrp pointer instead of swgroup, as a preparational change for the "mappings" debugfs feature. Signed-off-by: Nicolin Chen --- drivers/iommu/tegra-smmu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v6 1/6] iommu/tegra-smmu: Rename struct iommu_group *group to *grp

2021-09-13 Thread Nicolin Chen
There are a few structs using "group" for their pointer instances. This gets confusing sometimes. The instance of struct iommu_group is used in local function with an alias "grp", which can separate it from others. So this patch simply renames "group" to "grp" as a cleanup. Signed-off-by: Nicolin

[PATCH v6 3/6] iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrp

2021-09-13 Thread Nicolin Chen
There are both tegra_smmu_swgroup and tegra_smmu_group structs using "group" for their pointer instances. This gets confusing to read the driver sometimes. So this patch renames "group" of struct tegra_smmu_swgroup to "swgrp" as a cleanup. Also renames its "find" function. Note that we already ha

[PATCH v6 2/6] iommu/tegra-smmu: Rename struct tegra_smmu_group_soc *soc to *group_soc

2021-09-13 Thread Nicolin Chen
There are both tegra_smmu_soc and tegra_smmu_group_soc using "soc" for their pointer instances. This patch renames the one of struct tegra_smmu_group_soc from "soc" to "group_soc" to distinguish it. Signed-off-by: Nicolin Chen --- drivers/iommu/tegra-smmu.c | 17 + 1 file changed

[PATCH v6 0/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-13 Thread Nicolin Chen
This series of patches adds a new mappings node to debugfs for tegra-smmu driver. The first five patches are all preparational changes for PATCH-6, based on Thierry's review feedback against v5: https://lkml.org/lkml/2021/3/16/447 Changelog v6: * Added PATCH1-3 for better naming conventions * Ad

Re: [PATCH v2] dma-debug: prevent an error message from causing runtime problems

2021-09-13 Thread Christoph Hellwig
Thanks a lot. I've applied this with a little change to avoid breaking up the printed string into two lines. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH] iommu/dma: Tidy up Kconfig selects

2021-09-13 Thread Robin Murphy
Now that the dust has settled on converting all the x86 drivers to iommu-dma, we can punt the Kconfig selection to arch code where it was always intended to be. CC: Christoph Hellwig CC: Marek Szyprowski CC: x...@kernel.org CC: linux-i...@vger.kernel.org Signed-off-by: Robin Murphy --- arch/ia

[PATCH 2/2] iommu/dma: Unexport IOVA cookie management

2021-09-13 Thread Robin Murphy
IOVA cookies are now got and put by core code, so we no longer need to export these to modular drivers. The export for getting MSI cookies stays, since VFIO can still be a module, but it was already relying on someone else putting them, so that aspect is unaffected. Reviewed-by: Lu Baolu Reviewed

[PATCH 1/2] iommu/dart: Clean up IOVA cookie crumbs

2021-09-13 Thread Robin Murphy
The addition of the DART driver crossed over with moving IOVA cookie management into core code; clean up the now-unnecessary remnants here. Acked-by: Sven Peter Tested-by: Sven Peter Signed-off-by: Robin Murphy --- drivers/iommu/apple-dart.c | 2 -- 1 file changed, 2 deletions(-) diff --git a

[PATCH 0/2] iommu: DMA domain epilogue

2021-09-13 Thread Robin Murphy
Hi Joerg, As planned, here are the follow-up patches to resolve the merge of the DART driver with the core changes. There's some argument for this being 5.15 fix material (the driver getting DMA cookies unconditionally is still technically wrong), but in practice it shouldn't be an issue either if

Re: [PATCH v7 0/7] Fixes for dma-iommu swiotlb bounce buffers

2021-09-13 Thread David Stevens
Is there further feedback on these patches? Only patch 7 is still pending review. -David On Mon, Aug 30, 2021 at 2:00 PM David Stevens wrote: > > This patch set includes various fixes for dma-iommu's swiotlb bounce > buffers for untrusted devices. > > The min_align_mask issue was found when runn