[PATCH v1 0/7] Refactor the SMMU's CD table ownership

Michael Shavit posted 7 patches 2 years, 6 months ago
There is a newer version of this series
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c   |  35 +++-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 167 ++++++++----------
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  39 ++--
3 files changed, 123 insertions(+), 118 deletions(-)
[PATCH v1 0/7] Refactor the SMMU's CD table ownership
Posted by Michael Shavit 2 years, 6 months ago
Hi all,

This series refactors stage 1 domains so that they describe a single CD
entry. These entries are now inserted into a CD table that is owned by
the arm_smmu_master instead of the domain.
This is conceptually cleaner and unblocks other features, such as
attaching domains with PASID (for unmanaged/dma domains).

This patch series was originally part of a larger patch series that
implemented the set_dev_pasid callback for non-SVA domains but is now
split into a distinct series.

This patch series is also available on gerrit with Jean's SMMU test
engine patches cherry-picked on top for testing:
https://linux-review.git.corp.google.com/c/linux/kernel/git/torvalds/linux/+/24729

Thanks,
Michael Shavit

Changelog
v1:
* Replace s1_cfg with arm_smmu_ctx_desc_cfg representing the CD table
* Assume that the CD table is owned by the SMMU master for most
  operations. This is forward-compatible with the nested patch series as
  these operations wouldn't be called when the installed CD table comes
  from nested domains.
* Split off as a distinct patch series Split-off from:
https://lore.kernel.org/all/20230621063825.268890-1-mshavit@google.com/

Michael Shavit (7):
  iommu/arm-smmu-v3: Move ctx_desc out of s1_cfg
  iommu/arm-smmu-v3: Replace s1_cfg with ctx_desc_cfg
  iommu/arm-smmu-v3: Encapsulate ctx_desc_cfg init in alloc_cd_tables
  iommu/arm-smmu-v3: move stall_enabled to the cd table
  iommu/arm-smmu-v3: Skip cd sync if CD table isn't active
  iommu/arm-smmu-v3: Refactor write_ctx_desc
  iommu/arm-smmu-v3: Move CD table to arm_smmu_master

 .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c   |  35 +++-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 167 ++++++++----------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  39 ++--
 3 files changed, 123 insertions(+), 118 deletions(-)


base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd
-- 
2.41.0.585.gd2178a4bd4-goog
Re: [PATCH v1 0/7] Refactor the SMMU's CD table ownership
Posted by Nicolin Chen 2 years, 6 months ago
Hi Michael,

Thanks for sending this!

On Fri, Jul 28, 2023 at 02:26:16AM +0800, Michael Shavit wrote:
 
> This series refactors stage 1 domains so that they describe a single CD
> entry. These entries are now inserted into a CD table that is owned by
> the arm_smmu_master instead of the domain.
> This is conceptually cleaner and unblocks other features, such as
> attaching domains with PASID (for unmanaged/dma domains).
> 
> This patch series was originally part of a larger patch series that
> implemented the set_dev_pasid callback for non-SVA domains but is now
> split into a distinct series.
> 
> This patch series is also available on gerrit with Jean's SMMU test
> engine patches cherry-picked on top for testing:
> https://linux-review.git.corp.google.com/c/linux/kernel/git/torvalds/linux/+/24729

The link isn't accessible for public. I guess it should be this?
https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/24729

Nicolin
Re: [PATCH v1 0/7] Refactor the SMMU's CD table ownership
Posted by Michael Shavit 2 years, 6 months ago
On Fri, Jul 28, 2023 at 4:20 AM Nicolin Chen <nicolinc@nvidia.com> wrote:
> The link isn't accessible for public. I guess it should be this?
> https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/24729

Whoops sorry yeah that's the correct link.