lkml.org 
[lkml]   [2023]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC 3/8] iommufd: Support attach/replace hwpt per pasid
Date
> From: Baolu Lu <baolu.lu@linux.intel.com>
> Sent: Wednesday, September 27, 2023 10:49 AM
>
> On 9/26/23 5:26 PM, Yi Liu wrote:
> > From: Kevin Tian<kevin.tian@intel.com>
> >
> > This introduces three APIs for device drivers to manage pasid attach/
> > replace/detach.
> >
> > int iommufd_device_pasid_attach(struct iommufd_device *idev,
> > u32 pasid, u32 *pt_id);
> > int iommufd_device_pasid_replace(struct iommufd_device *idev,
> > u32 pasid, u32 *pt_id);
> > void iommufd_device_pasid_detach(struct iommufd_device *idev,
> > u32 pasid);
>
> I am a bit puzzled. Do we really need both attach and replace interfaces
> to install a hwpt onto a pasid on device? The IOMMUFD already tracks the
> connections between hwpt and {device, pasid}, so it could easily call
> the right iommu interfaces (attach vs. replace). Perhaps I overlooked
> previous discussion on this.
>

attach means a transition from non-present to present.

replace can support changing a present entry atomically if iommu driver
support it.

the necessity of supporting both applies to both RID and RID+PASID.
\
 
 \ /
  Last update: 2023-09-27 18:53    [W:0.081 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site