[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276517F572ACA4A926D44978CC2A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Wed, 27 Sep 2023 03:12:16 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Baolu Lu <baolu.lu@...ux.intel.com>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"joro@...tes.org" <joro@...tes.org>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"jgg@...dia.com" <jgg@...dia.com>,
"robin.murphy@....com" <robin.murphy@....com>
CC: "cohuck@...hat.com" <cohuck@...hat.com>,
"eric.auger@...hat.com" <eric.auger@...hat.com>,
"nicolinc@...dia.com" <nicolinc@...dia.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
"chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
"yi.y.sun@...ux.intel.com" <yi.y.sun@...ux.intel.com>,
"peterx@...hat.com" <peterx@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"shameerali.kolothum.thodi@...wei.com"
<shameerali.kolothum.thodi@...wei.com>,
"lulu@...hat.com" <lulu@...hat.com>,
"suravee.suthikulpanit@....com" <suravee.suthikulpanit@....com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"Duan, Zhenzhong" <zhenzhong.duan@...el.com>,
"Martins, Joao" <joao.m.martins@...cle.com>
Subject: RE: [RFC 3/8] iommufd: Support attach/replace hwpt per pasid
> From: Baolu Lu <baolu.lu@...ux.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@...el.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.
Powered by blists - more mailing lists