linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Convert SMMU to domain_alloc_paging()
@ 2023-10-05 18:28 Jason Gunthorpe
  2023-10-05 18:28 ` [PATCH 1/7] iommu/arm-smmu: Reorganize arm_smmu_domain_add_master() Jason Gunthorpe
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Jason Gunthorpe @ 2023-10-05 18:28 UTC (permalink / raw)
  To: iommu, Joerg Roedel, linux-arm-kernel, Robin Murphy, Will Deacon
  Cc: Lu Baolu, Heiko Stuebner, Joerg Roedel, Jerry Snitselaar,
	Marek Szyprowski, Nicolin Chen, Niklas Schnelle, Steven Price

Add the global statics for IDENTITY and BLOCKED to the SMMU driver and
change to use domain_alloc_paging(). This allows SMMU to finalize the
domain during allocation.

This is a bit more urgent as I noticed while looking at Nicolin's patches
that the disable_bypass module parameter no longer works. The system will
boot fine but the domains will be set to IDENTITY now. To fix this the
core code must request BLOCKED domains when using ARM DMA ops with this
module option set.

This series fixes SMMU, which seems like the more important one of the
two. SMMUv3 needs a similar repair, but it is more complex to get the two
global static domains into the SMMUv3 driver. As SMMUv3 is primarily an
ARM64 driver this is less important since the normal DMA API flow already
substantially establishes blocking domains via empty IOMMU_DOMAIN_DMA
attachments. Regardless I have addressed SMMUv3 seperately.

This relies on the first few patches of the dart conversion series:

https://lore.kernel.org/r/0-v2-bff223cf6409+282-dart_paging_jgg@nvidia.com

To enable the BLOCKED global static.

Jason Gunthorpe (7):
  iommu/arm-smmu: Reorganize arm_smmu_domain_add_master()
  iommu/arm-smmu: Convert to a global static identity domain
  iommu/arm-smmu: Implement IOMMU_DOMAIN_BLOCKED
  iommu/arm-smmu: Pass arm_smmu_domain to arm_smmu_init_domain_context()
  iommu/arm-smmu: Convert to domain_alloc_paging()
  iommu: Compute dev_iommu->require_direct sooner
  iommu: Restore SMMU "disable_bypass"

 drivers/iommu/arm/arm-smmu/arm-smmu.c | 133 ++++++++++++++++++--------
 drivers/iommu/arm/arm-smmu/arm-smmu.h |   1 -
 drivers/iommu/iommu.c                 |  49 ++++++++--
 include/linux/iommu.h                 |   3 +
 4 files changed, 136 insertions(+), 50 deletions(-)


base-commit: 4dbf5230cbdc65dd71a8df9e0710e66f2997057c
-- 
2.42.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-12-11 15:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-05 18:28 [PATCH 0/7] Convert SMMU to domain_alloc_paging() Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 1/7] iommu/arm-smmu: Reorganize arm_smmu_domain_add_master() Jason Gunthorpe
2023-10-06 12:05   ` Robin Murphy
2023-10-06 12:30     ` Jason Gunthorpe
2023-10-06 13:45       ` Robin Murphy
2023-10-05 18:28 ` [PATCH 2/7] iommu/arm-smmu: Convert to a global static identity domain Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 3/7] iommu/arm-smmu: Implement IOMMU_DOMAIN_BLOCKED Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 4/7] iommu/arm-smmu: Pass arm_smmu_domain to arm_smmu_init_domain_context() Jason Gunthorpe
2023-10-06 13:43   ` Robin Murphy
2023-10-06 13:53     ` Jason Gunthorpe
2023-10-06 14:56       ` Robin Murphy
2023-10-06 15:03         ` Jason Gunthorpe
2023-10-06 15:11   ` Steven Price
2023-10-06 16:23     ` Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 5/7] iommu/arm-smmu: Convert to domain_alloc_paging() Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 6/7] iommu: Compute dev_iommu->require_direct sooner Jason Gunthorpe
2023-10-05 18:28 ` [PATCH 7/7] iommu: Restore SMMU "disable_bypass" Jason Gunthorpe
2023-10-06 12:06   ` Robin Murphy
2023-10-06 12:41     ` Jason Gunthorpe
2023-11-30  0:49 ` [PATCH 0/7] Convert SMMU to domain_alloc_paging() Jason Gunthorpe
2023-12-11 14:14   ` Joerg Roedel
2023-12-11 14:22     ` Jason Gunthorpe
2023-12-11 15:40     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).