On 19/05/2023 14:49, Robin Murphy wrote: > On 2023-05-18 21:46, Joao Martins wrote: >> From: Kunkun Jiang <jiangkunkun@xxxxxxxxxx> >> >> As nested mode is not upstreamed now, we just aim to support dirty >> log tracking for stage1 with io-pgtable mapping (means not support >> SVA mapping). If HTTU is supported, we enable HA/HD bits in the SMMU >> CD and transfer ARM_HD quirk to io-pgtable. >> >> We additionally filter out HD|HA if not supportted. The CD.HD bit >> is not particularly useful unless we toggle the DBM bit in the PTE >> entries. > > ...seeds odd to describe the control which fundamentally enables DBM or not as > "not particularly useful" to the DBM use-case :/ > This is a remnant from v1 where we would just enable the context descriptor HD bit, but not actually enabling DBM until set_dirty_Tracking(). Which no longer is the case. Should remove this sentence. >> Link: https://lore.kernel.org/lkml/20210413085457.25400-6-zhukeqian1@xxxxxxxxxx/ >> Co-developed-by: Keqian Zhu <zhukeqian1@xxxxxxxxxx> >> Signed-off-by: Keqian Zhu <zhukeqian1@xxxxxxxxxx> >> Signed-off-by: Kunkun Jiang <jiangkunkun@xxxxxxxxxx> >> [joaomart:Convey HD|HA bits over to the context descriptor >> and update commit message; original in Link, where this is based on] >> Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx> >> --- >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 10 ++++++++++ >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 +++ >> drivers/iommu/io-pgtable-arm.c | 11 +++++++++-- >> include/linux/io-pgtable.h | 4 ++++ > > For the sake of cleanliness, please split the io-pgtable and SMMU additions into > separate patches (you could perhaps then squash set_dirty_tracking() into the > SMMU patch as well). > ack