cancel
Showing results for 
Search instead for 
Did you mean: 

Processors

efeu
Adept II

KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Hi,

There are a lot of messages/threads out there about bad performance while using AMDs Ryzen with KVM GPU passthrough. It revolves all on enabling/disabling npt, while enabled overall VM performance is nice but the GPU performance gives me about 20% (and a lot of drops to zero GPU usage, while CPU/Disk/Ram also doing nothing) compared to npt disabled. But while npt is disabled overall VM performance is like beeing on 4x86 with floppy disk as only storage. (Ex. it takes 2 seconds just to open startmenu while host and vm are in idle, and neither CPU pinning, changing CPU model, changing storage device nor using hugepages changed anything).

So everything I read pointed to a bug in the npt implementation? Anything I could do to get closer to the "thing" issuing this?

We've been discussing about this problem in community for a while now, but noone could find out the reason for this. I heard from Joerg that it might be related to a lower intercept rate being used when NPT is enabled, but we haven't been able to find a way to trace that to confirm.

Also wondering if this is an hardware related issue on Ryzens AMD-V, so the upcoming Naples does have it too? This would be a nogo for the server platform and, in my eyes, the death even pre-released. I hope someone from AMD can help here, this is a huge disadvantage on the Ryzen chips, and if not beeing resolved soon, I have to switch back to Intel as only option, beeing not alone with this...

Best Regards

efeu

86 Replies
lrehi
Adept I

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

I have the same problem and this is reproducable also on the AMD FX series CPU. If npt (nested page tables) is enabled, KVM guest is snappy and fast but game performance is very poor and if npt is disabled, KVM guest is slow but game performance is significantly better (although still bad overall because CPU performance dips).

efeu
Adept II

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Uh, didnt know that. Anyone from AMD watching this? Just want to know if it's beeing recognized, or if not, then I can stop wasting my time waiting.

Regards

ray_m
Community Manager
Community Manager

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

I haves escalated your question to a subject matter expert and will update this thread when I receive more information.

ray_m
Community Manager
Community Manager

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Support for GPU passthrough is a planned feature that will be enabled soon, in a BIOS update released by all motherboard manufacturers. The specific timing for your specific motherboard is unknown but AMD is aware of the issue and actively working to address it.

Also please provide your full system configuration details and steps to reproduce so we can feed this into our ryzen issues team for analysis. \

lrehi
Adept I

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Thanks, this is fantastic news! If Ryzen's multi-core setup fully supported this (there are also some reports that AMD Crimson graphics drivers don't work well with pass-through btw.), it would completely change my every-day-computing, making it all based on virtual machines.

0 Likes
efeu
Adept II

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Thank you for your response. The system specs I am testing with are:

  • R7 1700
  • GA-AX370-Gaming 5
  • 48GB Kingston ECC 2133 MHz
  • different GPU types

So what I've heard about AGESA 1006, is this https://www.reddit.com/r/Amd/comments/6cwxbd/ryzens_iommu_groupings_wagesa_1006_will_be_very/

There is something mentioned about GPU passthrough, but only IOMMU grouping.

But well, I do not have problems with the IOMMU groups, I'm happy with the grouping my board is offering, the problem occures with NPT enabled.

Will this beeing fixed with AGESA 1006?

Regards

@

By the way, if you want to set up a test environment, use any linux with kernel 4.10 or up, install kvm, try passing through the GPU, use npt enabled (which is default), install any version of Windows or Linux or BSD in the VM, then you will get the same results. Nothing distribution specific.

0 Likes
efeu
Adept II

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Long story short, no it didnt fix it...

Regards

0 Likes
jbsky
Journeyman III

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Hi,

Freeze/lag of image and sound with Virtualization, unplayable. I can't watch  a simple streaming....

I use ACS patch to split IOMMU group.

MSI pro Carbon X370.

1700 ryzen

2x 8 GB of Corsair CMU16GX4M2A2666C16

NVidia 960GTX

AMD RX460

Everywhere, I can read that the problem seem to be RAM frequency...

I hope for a serious improvement in performance.

0 Likes
efeu
Adept II

Re: KVM GPU passthrough (IOMMU) issue on Ryzens AMD-V

Well you're talking about common KVM issues if not configured correctly. Some onboard soundcards do always have some "crackles" if passed through. Try using a dedicated pci(-e)/usb soundcard or use the audio output through HDMI/DP.

Increasing the fabric frequency (what you mean) does increase overall performance, but has nothing to do with this bug.

0 Likes