public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] iommu: Make pasid array per device
@ 2023-08-01  6:31 Lu Baolu
  2023-08-01  6:31 ` [PATCH 1/2] iommu: Consolidate pasid dma ownership check Lu Baolu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Lu Baolu @ 2023-08-01  6:31 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
	Kevin Tian, Jean-Philippe Brucker, Nicolin Chen
  Cc: Yi Liu, Jacob Pan, iommu, kvm, linux-kernel, Lu Baolu

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.

Please help review and suggest.

Lu Baolu (2):
  iommu: Consolidate pasid dma ownership check
  iommu: Move pasid array from group to device

 include/linux/iommu.h |   2 +
 drivers/iommu/iommu.c | 105 +++++++++++++++++-------------------------
 2 files changed, 43 insertions(+), 64 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-08-04 13:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01  6:31 [PATCH 0/2] iommu: Make pasid array per device Lu Baolu
2023-08-01  6:31 ` [PATCH 1/2] iommu: Consolidate pasid dma ownership check Lu Baolu
2023-08-01  7:03   ` Tian, Kevin
2023-08-01  7:43     ` Baolu Lu
2023-08-02  1:39       ` Tian, Kevin
2023-08-02  3:20         ` Baolu Lu
2023-08-01  6:31 ` [PATCH 2/2] iommu: Move pasid array from group to device Lu Baolu
     [not found]   ` <1254d61b-1f4e-2ef3-c3dc-95180f26f08c@intel.com>
2023-08-01  8:40     ` Baolu Lu
2023-08-02 14:15 ` [PATCH 0/2] iommu: Make pasid array per device Jason Gunthorpe
2023-08-03  0:44   ` Tian, Kevin
2023-08-03 15:18     ` Jason Gunthorpe
2023-08-04  0:57       ` Tian, Kevin
2023-08-04  2:20       ` Baolu Lu
2023-08-04  2:30         ` Baolu Lu
2023-08-04 13:12           ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox