Skip to content

iommu: Isolate iova_cookie to actual owners

Nicolin Chen linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 9 repliesIn review
  2. v14 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommu: Add private_data_owner to iommu_domaindrivers/iommu/dma-iommu.c drivers/iommu/iommufd/hw_pagetable.c include/linux/iommu.h+11 -15 replies
2/4iommufd: Move iommufd_sw_msi and related functions to driver.cdrivers/iommu/iommufd/device.c drivers/iommu/iommufd/driver.c drivers/iommu/iommufd/iommufd_private.h +1 more+136 -1244 replies
3/4iommu: Drop sw_msi from iommu_domaindrivers/iommu/dma-iommu.c drivers/iommu/dma-iommu.h drivers/iommu/iommu.c +2 more+26 -300 replies
4/4iommu: Turn iova_cookie to dma-iommu private pointerdrivers/iommu/dma-iommu.c include/linux/iommu.h+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] iommu: Isolate iova_cookie to actual owners

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/[email protected]/

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

Signature · 1 line
2.43.0