mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/8] iommu: Add contiguous MSI mapping support
@ 2026-08-26 14:52 Andrew Jones
  2026-08-26 14:52 ` [RFC PATCH v1 1/8] iommu/dma: Prepare MSI physical address lists Andrew Jones
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Andrew Jones @ 2026-08-26 14:52 UTC (permalink / raw)
  To: iommu, linux-kernel; +Cc: jgg, kevin.tian, robin.murphy, joro, will

The RISC-V IOMMU MSI remapping series [1] needs to prepare mappings for
every possible IMSIC target before MSI composition may occur in atomic
context. The previous approach mapped each physical address separately
and kept a driver-owned PA-to-IOVA lookup table.

Jason Gunthorpe suggested passing the complete list of physical
addresses through the existing MSI preparation flow. This series
implements that idea as iommu_dma_prepare_msi_list(), which maps the
ordered list into one contiguous IOVA range and records its base and
granule shift in the MSI descriptor. The interrupt-remapping driver can
then derive the IOVA for each list entry without maintaining a separate
IOVA array.

Both DMA-IOMMU and iommufd backends are extended to support these list
mappings. The existing per-page mapping objects are retained, while
the first object identifies the complete range so identical lists can
reuse an existing mapping. iommufd allocates and installs a complete
range atomically and grows its software-MSI bitmaps beyond their
previous 64-entry limit.

This is being posted separately from the RISC-V MSI remapping work for
early RFC review of the common DMA-IOMMU and iommufd interfaces. The
RISC-V adaptation to iommu_dma_prepare_msi_list() is still in progress
and will be posted later.

LLM-based coding assistants were used during development for code
exploration, patch review, test execution, and drafting and editing
commit messages and this cover letter. I reviewed and finalized all
resulting code and text. Per-patch Assisted-by tags are omitted in
light of the ongoing discussion about simplifying coding-assistant
attribution[2].

Thanks,
drew

[1] https://lore.kernel.org/all/20260820214150.545737-1-andrew.jones@oss.qualcomm.com/
[2] https://lore.kernel.org/all/20260701-work-coding-assistants-v1-1-a20a94d1d606@kernel.org/

Andrew Jones (8):
  iommu/dma: Prepare MSI physical address lists
  iommufd: Convert struct iommufd_sw_msi_maps to a growable bitmap
  iommufd: Split software MSI map lookup and allocation
  iommufd: Bound software MSI mappings to the reserved range
  iommufd: Prepare software MSI maps for address lists
  iommufd: Install software MSI map ranges atomically
  iommufd: Prepare software MSI installation for address lists
  iommu/dma: Introduce iommu_dma_prepare_msi_list()

 drivers/iommu/dma-iommu.c               | 116 ++++++---
 drivers/iommu/dma-iommu.h               |  13 +-
 drivers/iommu/iommu-priv.h              |   7 +-
 drivers/iommu/iommu.c                   | 109 ++++++--
 drivers/iommu/iommufd/device.c          |  20 +-
 drivers/iommu/iommufd/driver.c          | 315 ++++++++++++++++++++----
 drivers/iommu/iommufd/hw_pagetable.c    |   1 +
 drivers/iommu/iommufd/io_pagetable.c    |   9 +-
 drivers/iommu/iommufd/iommufd_private.h |  51 +++-
 include/linux/iommu.h                   |   8 +
 10 files changed, 528 insertions(+), 121 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-08-27  8:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26 14:52 [RFC PATCH v1 0/8] iommu: Add contiguous MSI mapping support Andrew Jones
2026-08-26 14:52 ` [RFC PATCH v1 1/8] iommu/dma: Prepare MSI physical address lists Andrew Jones
2026-08-26 14:52 ` [RFC PATCH v1 2/8] iommufd: Convert struct iommufd_sw_msi_maps to a growable bitmap Andrew Jones
2026-08-26 14:52 ` [RFC PATCH v1 3/8] iommufd: Split software MSI map lookup and allocation Andrew Jones
2026-08-26 14:52 ` [RFC PATCH v1 4/8] iommufd: Bound software MSI mappings to the reserved range Andrew Jones
2026-08-26 14:52 ` [RFC PATCH v1 5/8] iommufd: Prepare software MSI maps for address lists Andrew Jones
2026-08-26 14:53 ` [RFC PATCH v1 6/8] iommufd: Install software MSI map ranges atomically Andrew Jones
2026-08-26 14:53 ` [RFC PATCH v1 7/8] iommufd: Prepare software MSI installation for address lists Andrew Jones
2026-08-26 14:53 ` [RFC PATCH v1 8/8] iommu/dma: Introduce iommu_dma_prepare_msi_list() Andrew Jones
2026-08-27  8:13 ` [RFC PATCH v1 0/8] iommu: Add contiguous MSI mapping support Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®