Skip to content

iommu: Support IOMMU_RESV_SW_MSI with nesting

Nicolin Chen linux-iommu linux-kselftest lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v23 patches 15 repliesApplied
  3. v13 patches 1 replySuperseded

Changes in v3 from the cover letter

* Refined PATCH-2 commit message
* Added domain->ops check in PATCH-2
* Added PATCH-4 to implement in SMMUv3 driver

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommufd: Reorder include filesdrivers/iommu/iommufd/device.c drivers/iommu/iommufd/fault.c drivers/iommu/iommufd/io_pagetable.c +10 more+33 -320 replies
2/4iommu/dma: Support MSIs through nested domainsdrivers/iommu/dma-iommu.c include/linux/iommu.h+20 -20 replies
3/4iommufd/selftest: Add coverage for IOMMU_RESV_SW_MSIdrivers/iommu/iommufd/iommufd_test.h drivers/iommu/iommufd/selftest.c tools/testing/selftests/iommu/iommufd_utils.h+97 -00 replies
4/4iommu/arm-smmu-v3: Implement arm_smmu_get_msi_mapping_domaindrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c+10 -00 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] iommu: Support IOMMU_RESV_SW_MSI with nesting

The dma-iommu needs to find the correct domain for MSI mapping. With an IOMMU_DOMAIN_NESTED, the mapping resides in its parent paging domain.

Add a get_msi_mapping_domain op for drivers to return paging domains.

Add an iommufd selftest coverage for that, by doing a loopback test.

Add arm_smmu_get_msi_mapping_domain in the SMMUv3 driver so its nesting feature could work with MSI correctly.

This is based on top of the reserved-IOVA change:
https://lore.kernel.org/all/[email protected]/
And Jason's SMMUv3 nesting series:
https://lore.kernel.org/all/[email protected]/

This series is on Github:
https://github.com/nicolinc/iommufd/commits/iommufd_nesting_sw_msi/

[changelog]
v3:
* Refined PATCH-2 commit message
* Added domain->ops check in PATCH-2
* Added PATCH-4 to implement in SMMUv3 driver
v2:
https://lore.kernel.org/all/[email protected]/
* Resent with a proper bug fix.

Thanks
Nicolin

Nicolin Chen (3):
iommufd: Reorder include files
iommufd/selftest: Add coverage for IOMMU_RESV_SW_MSI iommu/arm-smmu-v3: Implement arm_smmu_get_msi_mapping_domain

Robin Murphy (1):
iommu/dma: Support MSIs through nested domains

 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 10 ++
 drivers/iommu/dma-iommu.c                     | 18 +++-
 drivers/iommu/iommufd/device.c                |  4 +-
 drivers/iommu/iommufd/fault.c                 |  4 +-
 drivers/iommu/iommufd/io_pagetable.c          |  8 +-
 drivers/iommu/iommufd/io_pagetable.h          |  2 +-
 drivers/iommu/iommufd/ioas.c                  |  2 +-
 drivers/iommu/iommufd/iommufd_private.h       |  9 +-
 drivers/iommu/iommufd/iommufd_test.h          |  6 +-
 drivers/iommu/iommufd/iova_bitmap.c           |  2 +-
 drivers/iommu/iommufd/main.c                  |  8 +-
 drivers/iommu/iommufd/pages.c                 | 10 +-
 drivers/iommu/iommufd/selftest.c              | 92 ++++++++++++++++++-
 include/linux/iommu.h                         |  4 +
 include/linux/iommufd.h                       |  4 +-
 include/uapi/linux/iommufd.h                  |  2 +-
 tools/testing/selftests/iommu/iommufd_utils.h |  9 ++
 17 files changed, 160 insertions(+), 34 deletions(-)
Signature · 1 line
2.43.0