Messages in this thread | | | From | Michael Shavit <> | Date | Fri, 4 Aug 2023 01:56:12 +0800 | Subject | Re: [PATCH v4 6/8] iommu/arm-smmu-v3: Move CD table to arm_smmu_master |
| |
This patch introduces a subtle bug.
Previously, the arm-smmu-v3 driver could get away with skipping the clearing of the CD entry on detach, since the table belonged to the domain and wouldn't be re-written on re-attach. When we switch to the master-owned table model, that CDTE in the master's table can get written to with different CD domains. When the CD domain get's switched to a new one without first being cleared, arm_smmu_write_ctx will mis-interpret its call as an ASID update instead of an entirely new Cd.
This bug was handled by clearing the CD entry on detach in the "iommu/arm-smmu-v3: Refactor write_ctx_desc" commit before it was split from the set_dev_pasid series(https://lore.kernel.org/all/20230621063825.268890-5-mshavit@google.com/). The change was lost when the commit moved to this series however. It's splitting hairs a little, but that fix probably belongs in this patch instead.
| |