AMD/Ryzen NPT Fix Discovered For Better Pass-Through Graphics Performance
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.
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.
31 Comments