Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [PATCH v9 09/11] iommu: Prepare IOMMU domain for IOPF | Date | Tue, 28 Jun 2022 08:29:09 +0000 |
| |
> From: Lu Baolu <baolu.lu@linux.intel.com> > Sent: Tuesday, June 21, 2022 10:44 PM > +/* > + * I/O page fault handler for SVA > + */ > +enum iommu_page_response_code > +iommu_sva_handle_iopf(struct iommu_fault *fault, void *data) > +{ > + vm_fault_t ret; > + struct mm_struct *mm; > + struct vm_area_struct *vma; > + unsigned int access_flags = 0; > + struct iommu_domain *domain = data; > + unsigned int fault_flags = FAULT_FLAG_REMOTE; > + struct iommu_fault_page_request *prm = &fault->prm; > + enum iommu_page_response_code status = > IOMMU_PAGE_RESP_INVALID; > + > + if (!(prm->flags & IOMMU_FAULT_PAGE_REQUEST_PASID_VALID)) > + return status; > + > + mm = domain->mm;
What about directly passing domain->mm in as the fault data?
The entire logic here is only about mm instead of domain.
| |