lkml.org 
[lkml]   [2023]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/5] iommu: Support mm PASID 1:n with sva domains
From


On 8/8/23 23:19, Jason Gunthorpe wrote:
> On Tue, Aug 08, 2023 at 12:12:42PM -0300, Jason Gunthorpe wrote:
>
>> Lets please rework this function into two parts
>>
>> The first should be 'iommu_sva_alloc_domain()'
>>
>> It should do the list searching and user management. The usual
>> 'iommu_domain_free()' should be modified to clean it up.
>
> I suppose we can't quite do this fully since the domain allocation
> needs to use set_dev_pasid to detect compatability :( This is a
> similar problem we had with iommufd too.
>
> Still, the 'alloc and set_dev_pasid' should be in one function and it
> should be undone with iommu_detach_device_pasid() and
> iommu_domain_free().
>
> The helper bind/unbind functions should wrapper that sequence.
Make sense. I'll refine the error handling paths in bind/unbind
functions in the next version.

Thanks,
-Tina
>
> Jason

\
 
 \ /
  Last update: 2023-08-10 04:16    [W:0.063 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site