Re: [PATCH v5 06/13] PCI/P2PDMA: Add P2P DMA driver writer's documentation
From: Logan Gunthorpe
Date: Fri Aug 31 2018 - 15:12:18 EST
On 31/08/18 11:38 AM, Christian KÃnig wrote:
> If you can separate out adding the detection I can take a look adding
> this with my DMA-buf P2P efforts.
Oh, maybe my previous email wasn't clear, but I'd say that detection is
already separate from ZONE_DEVICE. Nothing really needs to be changed.
I just think you'll probably want to write you're own function similar
to pci_p2pdma_distance that perhaps just takes two pci_devs instead of
the list of clients as is needed by nvme-of-like users.
To enable a whitelist we just have to handle the case where
upstream_bridge_distance() returns -1 and check if the devices are in
the same root complex with supported root ports before deciding the
transaction is not supported.
Logan