From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: iommu/arm-smmu: implement iova_to_phys_length Date: Thu, 04 Jun 2026 15:00:35 +1000 Message-ID: In-Reply-To: <20260531093637.3893199-5-guanghuifeng@linux.alibaba.com> References: <20260531093637.3893199-1-guanghuifeng@linux.alibaba.com> <20260531093637.3893199-5-guanghuifeng@linux.alibaba.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Mechanical migration of ARM SMMU v3, ARM SMMU v1, and Qualcomm IOMMU. **arm-smmu.c issue**: The `arm_smmu_iova_to_phys_length` function doesn't pass `mapped_length` through to `arm_smmu_iova_to_phys_hard()`: ```c if (smmu_domain->smmu->impl && smmu_domain->smmu->impl->def_domain_type && smmu_domain->stage == ARM_SMMU_DOMAIN_S1) return arm_smmu_iova_to_phys_hard(domain, iova); ``` When the hardware translation path (`_hard`) is used, `mapped_length` will remain 0 (set at function entry). The software fallback inside `_hard` does call `ops->iova_to_phys_length(ops, iova, NULL)` -- but also passes NULL. So the hardware path never reports a page size. This is a functionality gap. **qcom-debug change**: The change from `ops->iova_to_phys()` to `ops->iova_to_phys_length()` in the fault handler is fine -- this is a debug/diagnostic path that only needs the address. --- Generated by Claude Code Patch Reviewer