Skip to content

Minor fixups and refactorings for AMD's io-pgtable code

Jason Gunthorpe linux-iommu linux-patches 2 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. v2 Latest14 patches 7 repliesApplied
  2. v114 patches 17 repliesSuperseded

Changes in v2 from the cover letter

- Add local 'cfg' variables to improve readability
v1: https://patch.msgid.link/r/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/14iommu/amd: Move allocation of the top table into v1_alloc_pgtabledrivers/iommu/amd/io_pgtable.c drivers/iommu/amd/iommu.c+8 -210 replies
2/14iommu/amd: Allocate the page table root using GFP_KERNELdrivers/iommu/amd/io_pgtable_v2.c+1 -10 replies
3/14iommu/amd: Set the pgsize_bitmap correctlydrivers/iommu/amd/iommu.c+4 -240 replies
4/14iommu/amd: Remove amd_iommu_domain_update() from page table freeingdrivers/iommu/amd/io_pgtable.c drivers/iommu/amd/iommu.c+2 -30 replies
5/14iommu/amd: Remove the amd_iommu_domain_set_pt_root() and relateddrivers/iommu/amd/amd_iommu.h drivers/iommu/amd/io_pgtable.c+0 -370 replies
6/14iommu/amd: Rename struct amd_io_pgtable iopt to pgtbldrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/io_pgtable.c drivers/iommu/amd/io_pgtable_v2.c +1 more+22 -220 replies
7/14iommu/amd: Remove amd_io_pgtable::pgtbl_cfgdrivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/iommu.c+4 -40 replies
8/14iommu/amd: Store the nid in io_pgtable_cfg instead of the domaindrivers/iommu/amd/amd_iommu.h drivers/iommu/amd/amd_iommu_types.h drivers/iommu/amd/io_pgtable.c +4 more+20 -141 reply
9/14iommu/amd: Narrow the use of struct protection_domain to invalidationdrivers/iommu/amd/io_pgtable.c drivers/iommu/amd/io_pgtable_v2.c+25 -191 reply
10/14iommu/amd: Remove conditions from domain free pathsdrivers/iommu/amd/iommu.c+10 -194 replies
11/14iommu/amd: Fix typo of , instead of ;drivers/iommu/amd/io_pgtable_v2.c+3 -30 replies
12/14iommu/amd: Remove the confusing dummy iommu_flush_ops tlb opsdrivers/iommu/amd/io_pgtable.c drivers/iommu/amd/io_pgtable_v2.c+0 -440 replies
13/14iommu/amd: Correct the reported page sizes from the V1 tabledrivers/iommu/amd/amd_iommu_types.h+2 -10 replies
14/14iommu/amd: Do not set the D bit on AMD v2 table entriesdrivers/iommu/amd/io_pgtable_v2.c+1 -10 replies

Reviews trailers per patch

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

PatchVasant Hegde
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-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 00/14] Minor fixups and refactorings for AMD's io-pgtable code

This is some preparation for the Generic PT work here:

https://patch.msgid.link/r/[email protected]

Where this aims to increase the separation between the page table code and the rest of the driver. Ideally the io_pgtable layer should be completely self contained and not reach out into the IOMMU driver's iommu_domain. This doesn't fully get there, but it does enough for now.

v2:
- Add local 'cfg' variables to improve readability
v1: https://patch.msgid.link/r/[email protected]

Jason Gunthorpe (14):
iommu/amd: Move allocation of the top table into v1_alloc_pgtable iommu/amd: Allocate the page table root using GFP_KERNEL iommu/amd: Set the pgsize_bitmap correctly
iommu/amd: Remove amd_iommu_domain_update() from page table freeing iommu/amd: Remove the amd_iommu_domain_set_pt_root() and related iommu/amd: Rename struct amd_io_pgtable iopt to pgtbl iommu/amd: Remove amd_io_pgtable::pgtbl_cfg
iommu/amd: Store the nid in io_pgtable_cfg instead of the domain iommu/amd: Narrow the use of struct protection_domain to invalidation iommu/amd: Remove conditions from domain free paths iommu/amd: Fix typo of , instead of ;
iommu/amd: Remove the confusing dummy iommu_flush_ops tlb ops iommu/amd: Correct the reported page sizes from the V1 table iommu/amd: Do not set the D bit on AMD v2 table entries

 drivers/iommu/amd/amd_iommu.h       |  15 +---
 drivers/iommu/amd/amd_iommu_types.h |  11 ++-
 drivers/iommu/amd/io_pgtable.c      | 102 +++++++++-------------------
 drivers/iommu/amd/io_pgtable_v2.c   |  56 +++++----------
 drivers/iommu/amd/iommu.c           |  97 ++++++++------------------
 drivers/iommu/amd/pasid.c           |   2 +-
 include/linux/io-pgtable.h          |   4 ++
 7 files changed, 88 insertions(+), 199 deletions(-)

base-commit: 47ac09b91befbb6a235ab620c32af719f8208399

Signature · 1 line
2.46.0