Skip to content

iommu/vt-d: Use ida for domain ID management

Lu Baolu 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 Latest2 patches 3 repliesIn review
  2. v13 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Drop the last patch which simplified the code with __free(). There needs a helper like xa_store_or_{reset,kfree}(). Thus I plan to put it a separated series with broader reviewers.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iommu/vt-d: Use ida to manage domain iddrivers/iommu/intel/dmar.c drivers/iommu/intel/iommu.c drivers/iommu/intel/iommu.h+34 -681 reply
2/2iommu/vt-d: Replace spin_lock with mutex to protect domain idadrivers/iommu/intel/dmar.c drivers/iommu/intel/iommu.c drivers/iommu/intel/iommu.h+7 -81 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKevin TianJason Gunthorpe
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] iommu/vt-d: Use ida for domain ID management

This converts the Intel iommu driver's domain ID management from a fixed-size bitmap to the dynamic ida allocator. This improves memory efficiency by only allocating resources for the domain IDs actually in use, rather than the maximum possible number.

The also includes necessary cleanups after the ida conversion, including locking adjustment for the ida.

---
Change log:
v2:
- Drop the last patch which simplified the code with __free(). There needs a helper like xa_store_or_{reset,kfree}(). Thus I plan to put it a separated series with broader reviewers.

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

Lu Baolu (2):
iommu/vt-d: Use ida to manage domain id
iommu/vt-d: Replace spin_lock with mutex to protect domain ida

 drivers/iommu/intel/dmar.c  |  4 ++
 drivers/iommu/intel/iommu.c | 90 ++++++++-----------------------------
 drivers/iommu/intel/iommu.h | 21 +++++++--
 3 files changed, 40 insertions(+), 75 deletions(-)
Signature · 1 line
2.43.0