From: Andrew Jones <andrew.jones@oss.qualcomm.com>
To: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: jgg@ziepe.ca, kevin.tian@intel.com, robin.murphy@arm.com,
joro@8bytes.org, will@kernel.org
Subject: [RFC PATCH v1 0/8] iommu: Add contiguous MSI mapping support
Date: Wed, 26 Aug 2026 16:52:54 +0200 [thread overview]
Message-ID: <20260826145302.449904-1-andrew.jones@oss.qualcomm.com> (raw)
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
next reply other threads:[~2026-08-26 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 14:52 Andrew Jones [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826145302.449904-1-andrew.jones@oss.qualcomm.com \
--to=andrew.jones@oss.qualcomm.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®