]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/P2PDMA: Ignore root complex whitelist when an IOMMU is present
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 19 Jun 2019 18:56:26 +0000 (12:56 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 19 Jun 2019 21:43:42 +0000 (16:43 -0500)
commit805ad815761f51a66466bbc0cd657268ae0d1180
tree22cc773a03637c7d72351c53d2306dc764f5e57a
parentb48e0d7fe5b5eb1732dfe0b8057a6c721c42f2d4
PCI/P2PDMA: Ignore root complex whitelist when an IOMMU is present

Presently, there is no path to DMA map P2PDMA memory, so if a TLP targeting
this memory hits the root complex and an IOMMU is present, the IOMMU will
reject the transaction, even if the RC would support P2PDMA.

So until the kernel knows to map these DMA addresses in the IOMMU, we
should not enable the whitelist when an IOMMU is present.

Link: https://lore.kernel.org/linux-pci/20190522201252.2997-1-logang@deltatee.com/
Fixes: dc16794baf1a ("PCI/P2PDMA: Allow P2P DMA between any devices under AMD ZEN Root Complex")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Christoph Hellwig <hch@lst.de>
drivers/pci/p2pdma.c