Hi Eric,

On 2025/9/29 17:55, Eric Auger wrote:

On 9/25/25 6:26 PM, Tao Tang wrote:
This patch adapts the Configuration Cache (STE/CD caches) to support
multiple security states.

The cache key, previously just the SMMUDevice, is now a composite key
of the SMMUDevice and the security index (sec_idx). This allows for
separate cache entries for the same device when operating in different
security states, preventing aliasing between secure and non-secure
configurations.

The configuration cache invalidation functions have been refactored to
correctly handle multiple security states, ensuring that invalidation
commands operate on the appropriate cache entries.

Finally, checks have been added to the stream table's MMIO read/write
logic to verify if the stream table is writable. This ensures that the
Configuration Cache management is compliant with the architecture.
I think this patch shall be split too. I would suggest

- In a preliminary patch, add txattrs and as new members in SMMUTransCfg
+ the related changes (smmu_get_ste, smmu_get_cd, smmu_find_ste.
smmuv3_translate. Add their init in smmuv3_get_config while leaving the
current key as is.
- In a second patch, manage the new config key
- then there are a bunch of changes which does not relate to
configuration cache: smmu_writell, smmu_writel and
smmu_strtab_base_writable. I think this can go in a separate patch.

What do you think?

Eric



Thank you for the detailed feedback and for taking the time to suggest a clear path forward.

You are absolutely right. I see now that this patch indeed mixes several distinct logical changes especially the mix of smmu_write/read and configuration cache maybe confused, and your suggestion to split it is the correct approach. It will certainly make the changes much easier to review and less error-prone.

I will do this in v3 series.

Thanks,
Tao



Reply via email to