lkml.org 
[lkml]   [2024]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5 6/9] iommufd: Fault-capable hwpt attach/detach/replace
Date
> From: Lu Baolu <baolu.lu@linux.intel.com>
> Sent: Tuesday, April 30, 2024 10:57 PM
> +
> +int iommufd_fault_domain_replace_dev(struct iommufd_device *idev,
> + struct iommufd_hw_pagetable *hwpt,
> + struct iommufd_hw_pagetable *old)
> +{
> + struct iommu_attach_handle *handle;
> + int ret;
> +
> + if (hwpt->fault)
> + ret = iommufd_fault_iopf_enable(idev);
> + else
> + iommufd_fault_iopf_disable(idev);
> +
> + ret = iommu_group_replace_domain(idev->igroup->group, hwpt-
> >domain);
> + if (ret)
> + goto out_cleanup;
> +
> + iommufd_auto_response_faults(old, idev);
> + handle = iommu_attach_handle_get(idev->igroup->group,
> IOMMU_NO_PASID, 0);
> + handle->idev = idev;

why is auto response required in replace? new requests can come
after the auto response anyway...

The user should prepare for faults delivered to the old or new hwpt
in the transition window.

\
 
 \ /
  Last update: 2024-05-27 18:28    [W:0.230 / U:20.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site