Linux 5.2 To Allow P2P DMA Between Any Devices On AMD Zen Systems

Written by Michael Larabel in AMD on 18 May 2019 at 07:14 AM EDT. 8 Comments
AMD
With the Linux 5.2 kernel an AMD-supplied change by AMDGPU developer Christian König allows for supporting peer-to-peer DMA between any devices on AMD Zen systems.

The patch by Christian allows for peer-to-peer DMA to happen on modern AMD systems even between different root ports, expanding the current assumptions by the kernel. The patch explains:
The PCI specs say that peer-to-peer DMA should be supported between any two devices that have a common upstream PCI-to-PCI bridge. But devices under different Root Ports don't share a common upstream bridge, and PCIe r4.0, sec 1.3.1, says routing peer-to-peer transactions between Root Ports in the same Root Complex is optional.

Many Root Complexes, including AMD ZEN, *do* support peer-to-peer DMA even between Root Ports. Add a whitelist and allow peer-to-peer DMA if both participants are attached to a Root Complex known to support it.

The change already landed in Linux Git as part of the PCI updates for Linux 5.2.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week