On 3/23/24 12:59 AM, Jason Gunthorpe wrote:
On Thu, Mar 14, 2024 at 03:41:23PM +0800, Baolu Lu wrote:
The whole cookie mechanism aims to address two things:
- Extend the domain lifetime until all pending page faults are
resolved.
Like you answered, I think the flush is a simpler scheme..
On Thu, Mar 14, 2024 at 03:41:23PM +0800, Baolu Lu wrote:
> The whole cookie mechanism aims to address two things:
>
> - Extend the domain lifetime until all pending page faults are
> resolved.
Like you answered, I think the flush is a simpler scheme..
> - Associate information about the iommu
On 2024/3/9 1:46, Jason Gunthorpe wrote:
On Mon, Jan 22, 2024 at 03:38:57PM +0800, Lu Baolu wrote:
@@ -215,7 +202,23 @@ static struct iopf_group *iopf_group_alloc(struct
iommu_fault_param *iopf_param,
group = abort_group;
}
+ cookie = iopf_pasid_cookie_get(iopf_param-
On Mon, Jan 22, 2024 at 03:38:57PM +0800, Lu Baolu wrote:
> @@ -215,7 +202,23 @@ static struct iopf_group *iopf_group_alloc(struct
> iommu_fault_param *iopf_param,
> group = abort_group;
> }
>
> + cookie = iopf_pasid_cookie_get(iopf_param->dev, pasid);
> + if (!cookie
The iommu sva implementation relies on iopf handling. Allocate an
attachment cookie and use the iopf domain attach/detach interface.
The SVA domain is guaranteed to be released after all outstanding
page faults are handled.
In the fault delivering path, the attachment cookie is retrieved,
instead