On 2024/2/7 16:14, Tian, Kevin wrote:
From: Lu Baolu <baolu...@linux.intel.com>
Sent: Monday, January 22, 2024 3:39 PM

+
+int iommufd_fault_iopf_handler(struct iopf_group *group)
+{
+       struct iommufd_hw_pagetable *hwpt = group->cookie->domain-
fault_data;
+       struct iommufd_fault *fault = hwpt->fault;
+

why not directly using iommufd_fault as the fault_data?

The relationship among these structures is:

    iommufd_hwpt -> iommu_domain
          ^
          |
          v
    iommufd_fault

It appears preferable to hook the hwpt instead of iommufd_fault to an
iommu_domain structure.

Best regards,
baolu


Reply via email to