Messages in this thread | | | From | Michael Shavit <> | Date | Thu, 27 Jul 2023 19:22:05 +0800 | Subject | Re: [PATCH v4 02/13] iommu/arm-smmu-v3: Add smmu_s1_cfg to smmu_master |
| |
Sorry for the delay; I'm trying to refactor these patches now.
> I think the master should have a pointer to the iommu_domain that owns > the STE or if NULL the master should assign its internal CD table to > the STE. Just to clarify, does the nested domain patch series require writing CDs into the user-space's CD table using arm_smmu_write_ctx_desc()? Or is there any other requirement for writing a CD into a domain-owned CD table from arm_smmu_write_ctx_desc?
Writing a CD entry to the CD table involves some dependencies on the master(s) that the table is attached to:
1. The CD entries STALL bit value in arm_smmu_write_ctx_desc depends on the master (e.g. if STALL_FORCE is set on the smmu device). This could potentially be encoded in arm_smmu_ctx_desc_cfg, at which point that CD table is only attachable to masters with the same stall_enabled value. 2. arm_smmu_write_ctx_desc must sync the CD for the attached master(s) in the middle of writing CD entry.
This is all easier to handle in arm_smmu_write_ctx_desc if the table is always owned by the master.
| |