Skip to content

iommu: Make pasid array per device

Lu Baolu kvm 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 Latest3 patches 8 repliesIn review
  2. v12 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Add an explict check for single-device group in the domain attaching device pasid interface. (Jason)
- Make assert_pasid_dma_ownership() returns true or false. Refactor the code in a way that does not change its exsiting behavior. (Kevin)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iommu: Make single-device group for PASID explicitdrivers/iommu/iommu.c+5 -06 replies
2/3iommu: Consolidate pasid dma ownership checkdrivers/iommu/iommu.c+18 -52 replies
3/3iommu: Move pasid array from group to devicedrivers/iommu/iommu.c include/linux/iommu.h+29 -530 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/3] iommu: Make pasid array per device

The PCI PASID enabling interface guarantees that the address space used by each PASID is unique. This is achieved by checking that the PCI ACS path is enabled for the device. If the path is not enabled, then the PASID feature cannot be used.

if (!pci_acs_path_enabled(pdev, NULL, PCI_ACS_RR | PCI_ACS_UF))
return -EINVAL;

The PASID array is not an attribute of the IOMMU group. It is more natural to store the PASID array in the per-device IOMMU data. This makes the code clearer and easier to understand.

Please help review and suggest.

Change log:
v2:
- Add an explict check for single-device group in the domain attaching device pasid interface. (Jason)
- Make assert_pasid_dma_ownership() returns true or false. Refactor the code in a way that does not change its exsiting behavior. (Kevin)

v1: https://lore.kernel.org/linux-iommu/[email protected]/

Lu Baolu (3):
iommu: Make single-device group for PASID explicit
iommu: Consolidate pasid dma ownership check
iommu: Move pasid array from group to device

 include/linux/iommu.h |   2 +
 drivers/iommu/iommu.c | 102 +++++++++++++++++++-----------------------
 2 files changed, 49 insertions(+), 55 deletions(-)
Signature · 1 line
2.34.1