iommu/process: Track process changes with an mmu_notifier
ascend inclusion category: feature bugzilla: 14369 CVE: NA -------------- commit https://patchwork.ozlabs.org/patch/822423/ When creating an iommu_process structure, register a notifier to be informed of changes to the virtual address space and to know when the process exits. Two new operations are added to the IOMMU driver: * process_invalidate when a range of addresses is unmapped, to let the IOMMU driver send TLB invalidations. * process_exit when the mm is released. It's a bit more involved in this case, as the IOMMU driver has to tell all devices drivers to stop using this PASID, then clear the PASID table and invalidate TLBs. Adding the notifier in the mix complicates process release. In one case device drivers free the process explicitly by calling unbind (or detaching the device). In the other case the process could crash before unbind, in which case the release notifier has to do all the work. Signed-off-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com> Signed-off-by: NFang Lijun <fanglijun3@huawei.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录