On Thu, Sep 05, 2024 at 11:30:05AM +0800, Baolu Lu wrote:
On 9/4/24 9:17 PM, Joel Granados via B4 Relay wrote:I don't follow. The way that I read it: if the pasid_array x-array does
From: Joel Granados<j.granados@xxxxxxxxxxx>The iommu_attach_handle is expected only when an iopf-capable domain is
iommu_report_device_fault expects a pasid array to have an
iommu_attach_handle when a fault is detected.
attached to the device or PASID. The iommu_report_device_fault() treats
it as a fault when a fault occurs, but no iopf-capable domain is
attached.
not have an iommu_attach_handle indexed by either fault->prm.pasid or
IOMMU_NO_PASID, it will follow the err_bad_iopf and return -EINVAL
(please correct me if I'm wrong). So the iommu_attach_handle is*always*
expected.
Would it be more clear for it to be:
"""
The iommu_report_device_fault function expects the pasid_array x-array
to have an iommu_attach_handle indexed by a PASID. Add one indexed with
IOMMU_NO_PASID when the replacing HWPT has a valid iommufd fault object.
Remove it when we release ownership of the group.