lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276C5EEA6AAF9540707AD238C9B2@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Wed, 11 Sep 2024 08:06:48 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Nicolin Chen <nicolinc@...dia.com>
CC: "jgg@...dia.com" <jgg@...dia.com>, "corbet@....net" <corbet@....net>,
	"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>, "linux-doc@...r.kernel.org"
	<linux-doc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Liu, Yi L" <yi.l.liu@...el.com>,
	"eric.auger@...hat.com" <eric.auger@...hat.com>,
	"shameerali.kolothum.thodi@...wei.com"
	<shameerali.kolothum.thodi@...wei.com>, "smostafa@...gle.com"
	<smostafa@...gle.com>, "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>
Subject: RE: [PATCH] Documentation: userspace-api: iommufd: Update HWPT_PAGING
 and HWPT_NESTED

> From: Nicolin Chen <nicolinc@...dia.com>
> Sent: Wednesday, September 11, 2024 3:31 PM
> 
> On Wed, Sep 11, 2024 at 07:09:15AM +0000, Tian, Kevin wrote:
> > > From: Nicolin Chen <nicolinc@...dia.com>
> > > Sent: Wednesday, September 11, 2024 4:41 AM
> > >
> > > -3. IOMMUFD_OBJ_HW_PAGETABLE is created when an external driver
> calls
> > > the IOMMUFD
> > > +3. IOMMUFD_OBJ_HWPT_PAGING can be created in two ways:
> > > +
> > > +   IOMMUFD_OBJ_HWPT_PAGING is created when an external driver
> calls
> > > the IOMMUFD
> > >     kAPI to attach a bound device to an IOAS. Similarly the external driver
> uAPI
> > >     allows userspace to initiate the attaching operation. If a compatible
> > >     pagetable already exists then it is reused for the attachment. Otherwise
> a
> > >     new pagetable object and iommu_domain is created. Successful
> > > completion of
> > >     this operation sets up the linkages among IOAS, device and
> > > iommu_domain. Once
> > > -   this completes the device could do DMA.
> > > -
> > > -   Every iommu_domain inside the IOAS is also represented to userspace
> as
> > > a
> > > -   HW_PAGETABLE object.
> > > +   this completes the device could do DMA. Note that every
> iommu_domain
> > > inside
> > > +   the IOAS is also represented to userspace as an
> > > IOMMUFD_OBJ_HWPT_PAGING.
> >
> > the last sentence is redundant. here we are talking about how
> HWPT_PAGING
> > is created so it's implied. probably you can state that HWPT_PAGING object
> > is created when talking about "otherwise a new page table object and
> > iommu_domain is created".
> 
> I don't quite get this part...where is the redundancy? And where
> is "otherwise a new page table object .."?

the original text:

   allows userspace to initiate the attaching operation. If a compatible
   pagetable already exists then it is reused for the attachment. Otherwise a
   new pagetable object and iommu_domain is created. Successful completion of

it's clear to say that HWPT_PAGING object is created upon successful 
completion there. Then naturally every iommu_domain in an IOAS
is represented to userspace as HWPT_PAGING. Not added by you
but could be cleaned up while at it. 😊 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ