[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMplBfgSb8Hh9jLt@ziepe.ca>
Date: Wed, 2 Aug 2023 11:15:33 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Kevin Tian <kevin.tian@...el.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
Nicolin Chen <nicolinc@...dia.com>,
Yi Liu <yi.l.liu@...el.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
iommu@...ts.linux.dev, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] iommu: Make pasid array per device
On Tue, Aug 01, 2023 at 02:31:23PM +0800, Lu Baolu wrote:
> The PCI PASID enabling interface guarantees that the address space used
> by each PASID is unique. This is achieved by checking that the PCI ACS
> path is enabled for the device. If the path is not enabled, then the
> PASID feature cannot be used.
>
> if (!pci_acs_path_enabled(pdev, NULL, PCI_ACS_RR | PCI_ACS_UF))
> return -EINVAL;
>
> The PASID array is not an attribute of the IOMMU group. It is more
> natural to store the PASID array in the per-device IOMMU data. This
> makes the code clearer and easier to understand. No functional changes
> are intended.
Is there a reason to do this?
*PCI* requires the ACS/etc because PCI kind of messed up how switches
handled PASID so PASID doesn't work otherwise.
But there is nothing that says other bus type can't have working
(non-PCI) PASID and still have device isolation issues.
So unless there is a really strong reason to do this we should keep
the PASID list in the group just like the domain.
Jason
Powered by blists - more mailing lists