AMD/Ryzen NPT Fix Discovered For Better Pass-Through Graphics Performance
Written by Michael Larabel in AMD on 27 October 2017 at 05:45 AM EDT. 31 Comments
AMD --
One area where AMD Ryzen users have encountered Linux issues with virtualization is when trying to setup pass-through support for a graphics card to allow the virtual machine direct access to the GPU. When NPT (Nested Page Tables) are enabled, performance can become severely degraded.

GPU/PCI pass-through problems have affected the small number of Ryzen Linux users trying to setup such a configuration, mostly for gaming, when NPT is enabled. Some have thought it was a hardware bug, etc, but the good news is a fix is in the works.

A Phoronix reader pointed out this mailing list post by Geoffrey McRae, "I have identified the issue! With NPT enabled I am now getting near bare metal performance with PCI pass through. The issue was with some stubs that have not been properly implemented. I will clean my code up and submit a patch shortly. This is a 10 year old bug that has only become evident with the recent ability to perform PCI pass-through with dedicated graphics cards. I would expect this to improve performance across most workloads that use AMD NPT."

With his pending fix for the Linux IOMMU code, there's nearly a 5x improvement in graphics performance when doing PCI pass-through of his GeForce GTX 1080 Ti paired with a Ryzen 7 processor.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week