Skip to content

iommu/amd: Improve domain allocator and device attach code path

Vasant Hegde linux-iommu 5 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 1 replyApplied
  2. v412 patches 8 repliesApplied
  3. v310 patches 17 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v210 patches17 repliesSuperseded
v110 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Rebased on top of iommu/core branch
- Added Reviewed-by tags
- Renamed amd_iommu_pdom_id_alloc -> pdom_id_alloc() as its static function
- Fixed patch 11 subject line

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/12iommu/amd/pgtbl_v2: Take protection domain lock before invalidating TLBdrivers/iommu/amd/io_pgtable_v2.c+3 -00 replies
2/12iommu/amd: Use ida interface to manage protection domain IDdrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/init.c drivers/iommu/amd/iommu.c+35 -580 replies
3/12iommu/amd: Remove protection_domain.dev_cnt variabledrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/iommu.c+1 -70 replies
4/12iommu/amd: xarray to track protection_domain->iommu listdrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/iommu.c+77 -200 replies
5/12iommu/amd: Remove unused amd_iommus variabledrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/init.c+0 -120 replies
6/12iommu/amd: Do not detach devices in domain free pathdrivers/iommu/amd/iommu.c+1 -250 replies
7/12iommu/amd: Reduce domain lock scope in attach device pathdrivers/iommu/amd/iommu.c+30 -220 replies
8/12iommu/amd: Rearrange attach device codedrivers/iommu/amd/iommu.c+36 -550 replies
9/12iommu/amd: Convert dev_data lock from spinlock to mutexdrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/iommu.c+8 -80 replies
10/12iommu/amd: Reorder attach device codedrivers/iommu/amd/iommu.c+29 -360 replies
11/12iommu/amd: Add ops->release_domaindrivers/iommu/amd/iommu.c+9 -00 replies
12/12iommu/amd: Improve amd_iommu_release_device()drivers/iommu/amd/iommu.c+6 -270 replies

Reviews trailers per patch

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

PatchJason GunthorpeSuravee SuthikulpanitJoerg Roedel
1/12R-b
2/12R-b
3/12R-b R-b R-b
4/12R-b R-b
5/12R-b R-b
6/12R-b R-b
7/12R-b
8/12R-b R-b
9/12R-b R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/12] iommu/amd: Improve domain allocator and device attach code path

This series aims to improve domain allocator and attach device code path.
- Replace custom domain ID allocator with IDA allocator.
- Improve protection domain data structure
- Improve attach device code path and replace dev_data spinlock with mutex
- Add ops->release_domain() support

This series is on top of iommu/core branch (Commit a33bf8d8ce7).

This is also available at github :
https://github.com/AMDESE/linux-iommu/tree/iommu_rework_attach_dev_v5

Changes from v4 - v5:
- Rebased on top of iommu/core branch
- Added Reviewed-by tags
- Renamed amd_iommu_pdom_id_alloc -> pdom_id_alloc() as its static function
- Fixed patch 11 subject line

V4: https://lore.kernel.org/linux-iommu/[email protected]/T/#t

Changes from v3 - v4:
- Added release domain support
- Added new patch to fix missign lock in pgtbl_v2 code path
- Reworked protection domain ID allocation code
- Fixed missing lock in TLB flush code path
- Improved amd_iommu_release_device()

V3 : https://lore.kernel.org/linux-iommu/[email protected]/T/#u

Changes from v2 -> v3:
- Rebased on top of v6.12-rc3
- Added Reviewed-by tags
- Updated patch description

V2 : https://lore.kernel.org/linux-iommu/[email protected]/T/#t

Changes from v1 -> v2:
- Rebased on top of iommu/next
- Minor fixes.

V1 : https://lore.kernel.org/linux-iommu/[email protected]/T/#t

-Vasant

Vasant Hegde (12):
iommu/amd/pgtbl_v2: Take protection domain lock before invalidating
TLB
iommu/amd: Use ida interface to manage protection domain ID iommu/amd: Remove protection_domain.dev_cnt variable iommu/amd: xarray to track protection_domain->iommu list iommu/amd: Remove unused amd_iommus variable
iommu/amd: Do not detach devices in domain free path iommu/amd: Reduce domain lock scope in attach device path iommu/amd: Rearrange attach device code
iommu/amd: Convert dev_data lock from spinlock to mutex iommu/amd: Reorder attach device code
iommu/amd: Add ops->release_domain
iommu/amd: Improve amd_iommu_release_device()

 drivers/iommu/amd/amd_iommu_types.h |  23 +-
 drivers/iommu/amd/init.c            |  37 +--
 drivers/iommu/amd/io_pgtable_v2.c   |   3 +
 drivers/iommu/amd/iommu.c           | 360 +++++++++++++---------------
 4 files changed, 194 insertions(+), 229 deletions(-)
Signature · 1 line
2.31.1