From: Nicolin Chen <nicolinc@nvidia.com>
To: <jgg@nvidia.com>, <kevin.tian@intel.com>, <robin.murphy@arm.com>,
<joro@8bytes.org>, <will@kernel.org>
Cc: <iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 0/4] iommu: Isolate iova_cookie to actual owners
Date: Thu, 27 Feb 2025 17:31:14 -0800 [thread overview]
Message-ID: <cover.1740705776.git.nicolinc@nvidia.com> (raw)
Now, iommufd implements its own sw_msi function that does not touch the
domain->iova_cookie but domain->iommufd_hwpt, as a domain owner pointer.
Isolate the iova_cookie from iommufd by putting it into the union where
the iommufd_hwpt is located.
This requires a set of preparations for iommu core to know what module
owns the domain private data. Since there are only two implementations
of the sw_msi function pointer, take an easier approach by calling the
two implementations directly according to a new private_data_owner tag.
This is a clean-up series for the sw_msi Part-1 core series, prior to
the Part-2/3 series. It's on github:
https://github.com/nicolinc/iommufd/commits/iommufd_msi_cleanup-v2
Changelog
v2
* Drop sw_msi function pointer
* Add a new private_data_owner tag in iommu_domain
* Let iommu core call the two sw_msi implementations directly
v1
https://lore.kernel.org/all/cover.1740600272.git.nicolinc@nvidia.com/
Thanks
Nicolin
Nicolin Chen (4):
iommu: Add private_data_owner to iommu_domain
iommufd: Move iommufd_sw_msi and related functions to driver.c
iommu: Drop sw_msi from iommu_domain
iommu: Turn iova_cookie to dma-iommu private pointer
drivers/iommu/dma-iommu.h | 9 ++
drivers/iommu/iommufd/iommufd_private.h | 5 +-
include/linux/iommu.h | 24 ++---
include/linux/iommufd.h | 9 ++
drivers/iommu/dma-iommu.c | 18 ++--
drivers/iommu/iommu.c | 16 ++-
drivers/iommu/iommufd/device.c | 122 -----------------------
drivers/iommu/iommufd/driver.c | 124 ++++++++++++++++++++++++
drivers/iommu/iommufd/hw_pagetable.c | 6 +-
9 files changed, 176 insertions(+), 157 deletions(-)
base-commit: 598749522d4254afb33b8a6c1bea614a95896868
--
2.43.0
next reply other threads:[~2025-02-28 1:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 1:31 Nicolin Chen [this message]
2025-02-28 1:31 ` [PATCH v2 1/4] iommu: Add private_data_owner to iommu_domain Nicolin Chen
2025-02-28 3:13 ` Baolu Lu
2025-02-28 3:23 ` Nicolin Chen
2025-02-28 3:29 ` Baolu Lu
2025-02-28 16:29 ` Robin Murphy
2025-02-28 17:40 ` Nicolin Chen
2025-02-28 1:31 ` [PATCH v2 2/4] iommufd: Move iommufd_sw_msi and related functions to driver.c Nicolin Chen
2025-02-28 17:32 ` Jason Gunthorpe
2025-02-28 17:54 ` Nicolin Chen
2025-02-28 18:02 ` Jason Gunthorpe
2025-02-28 18:10 ` Nicolin Chen
2025-02-28 1:31 ` [PATCH v2 3/4] iommu: Drop sw_msi from iommu_domain Nicolin Chen
2025-02-28 1:31 ` [PATCH v2 4/4] iommu: Turn iova_cookie to dma-iommu private pointer Nicolin Chen
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=cover.1740705776.git.nicolinc@nvidia.com \
--to=nicolinc@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--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