[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276A2B5E849C2153939934C8CDF9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Wed, 1 Jun 2022 01:43:25 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Baolu Lu <baolu.lu@...ux.intel.com>
CC: Jason Gunthorpe <jgg@...dia.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
David Woodhouse <dwmw2@...radead.org>,
"Jean-Philippe Brucker" <jean-philippe@...aro.com>,
Christoph Hellwig <hch@...radead.org>,
"vkoul@...nel.org" <vkoul@...nel.org>,
"robin.murphy@....com" <robin.murphy@....com>,
"will@...nel.org" <will@...nel.org>,
"Liu, Yi L" <yi.l.liu@...el.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
Eric Auger <eric.auger@...hat.com>
Subject: RE: [PATCH v4 1/6] iommu: Add a per domain PASID for DMA API
> From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> Sent: Wednesday, June 1, 2022 1:30 AM
> > >
> > > In both cases the pasid is stored in the attach data instead of the
> > > domain.
> > >
> So during IOTLB flush for the domain, do we loop through the attach data?
Yes and it's required.
>
> > > DMA API pasid is no special from above except it needs to allow
> > > one device attached to the same domain twice (one with RID
> > > and the other with RID+PASID).
> > >
> > > for iommufd those operations are initiated by userspace via
> > > iommufd uAPI.
> >
> > My understanding is that device driver owns its PASID policy. If ENQCMD
> > is supported on the device, the PASIDs should be allocated through
> > ioasid_alloc(). Otherwise, the whole PASID pool is managed by the device
> > driver.
> >
> It seems the changes we want for this patchset are:
> 1. move ioasid_alloc() from the core to device (allocation scope will be
> based on whether ENQCMD is intended or not)
yes, and the driver can specify whether the allocation is system-wide
or per-device.
> 2. store pasid in the attach data
> 3. use the same iommufd api to attach/set pasid on its default domain
s/iommufd/iommu/
Powered by blists - more mailing lists