Messages in this thread | | | Date | Thu, 26 May 2022 09:03:21 +0800 | Subject | Re: [PATCH v7 03/10] iommu/sva: Add iommu_sva_domain support | From | Baolu Lu <> |
| |
On 2022/5/25 23:25, Jason Gunthorpe wrote: > On Wed, May 25, 2022 at 01:19:08PM +0800, Baolu Lu wrote: >> Hi Jason, >> >> On 2022/5/24 21:44, Jason Gunthorpe wrote: >>>> diff --git a/drivers/iommu/iommu-sva-lib.c b/drivers/iommu/iommu-sva-lib.c >>>> index 106506143896..210c376f6043 100644 >>>> +++ b/drivers/iommu/iommu-sva-lib.c >>>> @@ -69,3 +69,51 @@ struct mm_struct *iommu_sva_find(ioasid_t pasid) >>>> return ioasid_find(&iommu_sva_pasid, pasid, __mmget_not_zero); >>>> } >>>> EXPORT_SYMBOL_GPL(iommu_sva_find); >>>> + >>>> +/* >>>> + * IOMMU SVA driver-oriented interfaces >>>> + */ >>>> +struct iommu_domain * >>>> +iommu_sva_alloc_domain(struct bus_type *bus, struct mm_struct *mm) >>> This should return the proper type >>> >> >> Can you please elaborate a bit on "return the proper type"? Did you mean >> return iommu_sva_domain instead? That's a wrapper of iommu_domain and >> only for iommu internal usage. > > If you are exposing special SVA APIs then it is not internal usage > only anymore, so expose the type.
Ah, got you. Thanks for the explanation.
Best regards, baolu
| |