Skip to content

iommu/vt-d: Some Intel IOMMU cleanups

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 Latest11 patches 24 repliesIn review
  2. v110 patches 20 repliesSuperseded

Changes in v2 from the cover letter

- Avoid migration of large amounts of code.
- Split the cleanup patches into separated ones for convenient code review.
- This version of series is available on github:
https://github.com/LuBaolu/intel-iommu/commits/iommu-vtd-cleanup-v2

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11iommu/vt-d: Remove intel_iommu::domainsdrivers/iommu/intel/iommu.c include/linux/intel-iommu.h+3 -661 reply
2/11iommu/vt-d: Remove finding domain in dmar_insert_one_dev_info()drivers/iommu/intel/iommu.c+0 -211 reply
3/11iommu/vt-d: Remove iova_cache_get/put()drivers/iommu/intel/iommu.c+0 -51 reply
4/11iommu/vt-d: Remove domain and devinfo mempooldrivers/iommu/intel/iommu.c+5 -991 reply
5/11iommu/vt-d: Remove DEFER_DEVICE_DOMAIN_INFOdrivers/iommu/intel/debugfs.c drivers/iommu/intel/iommu.c drivers/iommu/intel/pasid.c +2 more+79 -1303 replies
6/11iommu/vt-d: Remove unnecessary includesdrivers/iommu/intel/iommu.c+7 -273 replies
7/11iommu/vt-d: Remove unnecessary prototypesdrivers/iommu/intel/iommu.c+0 -52 replies
8/11iommu/vt-d: Fix indentation of goto labelsdrivers/iommu/intel/iommu.c+2 -23 replies
9/11iommu/vt-d: Remove commented codedrivers/iommu/intel/iommu.c+1 -95 replies
10/11iommu/vt-d: Use xarray for global device_domain_infodrivers/iommu/intel/iommu.c include/linux/intel-iommu.h+34 -394 replies
11/11iommu/vt-d: Use rculist for per-domain device listdrivers/iommu/intel/debugfs.c drivers/iommu/intel/iommu.c include/linux/intel-iommu.h+53 -860 replies

Reviews trailers per patch

9 of 11 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigJason Gunthorpe
1/11R-b R-b
2/11R-b R-b
3/11R-b R-b
4/11R-b R-b
5/11R-b R-b
6/11R-b R-b
7/11R-b R-b
8/11R-b R-b
9/11R-b R-b
10/11
11/11

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 00/11] iommu/vt-d: Some Intel IOMMU cleanups

Hi folks,

After a long time of evolution, the drivers/iommu/intel/iommu.c becomes a bit messy. This series tries to cleanup and refactor the driver to make it more concise.

It includes,

- Remove some unnecessary code, includes and prototypes;
- Move creating per-device driver data from domain_attach to device_probe callback.
- Use an array for global per-device driver data so that they could be searched repidly.
- Use the rculist for per-domain device driver data and remove the existing spinlock.
- Code style fix.

Your comments are very appreciated.

Best regards,
baolu

Change log:

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

v2:
- Avoid migration of large amounts of code.
- Split the cleanup patches into separated ones for convenient code review.
- This version of series is available on github:
https://github.com/LuBaolu/intel-iommu/commits/iommu-vtd-cleanup-v2

Lu Baolu (11):
iommu/vt-d: Remove intel_iommu::domains
iommu/vt-d: Remove finding domain in dmar_insert_one_dev_info() iommu/vt-d: Remove iova_cache_get/put()
iommu/vt-d: Remove domain and devinfo mempool iommu/vt-d: Remove DEFER_DEVICE_DOMAIN_INFO iommu/vt-d: Remove unnecessary includes
iommu/vt-d: Remove unnecessary prototypes
iommu/vt-d: Fix indentation of goto labels iommu/vt-d: Remove commented code
iommu/vt-d: Use xarray for global device_domain_info iommu/vt-d: Use rculist for per-domain device list

 include/linux/intel-iommu.h   |   6 +-
 drivers/iommu/intel/debugfs.c |  14 +-
 drivers/iommu/intel/iommu.c   | 597 +++++++++-------------------------
 drivers/iommu/intel/pasid.c   |  12 +-
 drivers/iommu/intel/svm.c     |   6 +-
 5 files changed, 165 insertions(+), 470 deletions(-)
Signature · 1 line
2.25.1