[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211027231134.GA258571@bhelgaas>
Date: Wed, 27 Oct 2021 18:11:34 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Dongdong Liu <liudongdong3@...wei.com>
Cc: hch@...radead.org, kw@...ux.com, logang@...tatee.com,
leon@...nel.org, linux-pci@...r.kernel.org, rajur@...lsio.com,
hverkuil-cisco@...all.nl, linux-media@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH V10 6/8] PCI/P2PDMA: Add a 10-Bit Tag check in P2PDMA
On Sat, Oct 09, 2021 at 06:49:36PM +0800, Dongdong Liu wrote:
> Add a 10-Bit Tag check in the P2PDMA code to ensure that a device with
> 10-Bit Tag Requester doesn't interact with a device that does not
> support 10-Bit Tag Completer. Before that happens, the kernel should
> emit a warning.
> Signed-off-by: Dongdong Liu <liudongdong3@...wei.com>
> Reviewed-by: Logan Gunthorpe <logang@...tatee.com>
> @@ -532,6 +577,9 @@ calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client,
> map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED;
> }
> done:
> + if (pci_10bit_tags_unsupported(client, provider, verbose))
> + map_type = PCI_P2PDMA_MAP_NOT_SUPPORTED;
I need to be convinced that this check is in the right spot to catch
all potential P2PDMA situations. The pci_p2pmem_find() and
pci_p2pdma_distance() interfaces eventually call
calc_map_type_and_dist(). But those interfaces don't actually produce
DMA bus addresses, and I'm not convinced that all P2PDMA users use
them.
nvme *does* use them, but infiniband (rdma_rw_map_sg()) does not, and
it calls pci_p2pdma_map_sg().
amdgpu_dma_buf_attach() calls pci_p2pdma_distance_many() but I don't
know where it sets up P2PDMA transactions.
cxgb4 and qed mention "peer2peer", but I don't know whether they are
related; they don't seem to use any pci_p2p.* interfaces.
> rcu_read_lock();
> p2pdma = rcu_dereference(provider->p2pdma);
> if (p2pdma)
> --
> 2.22.0
>
Powered by blists - more mailing lists