GPU Passthrough with KVM: Have Your Cake and Eat it Too

It is discussed a bit here. Sounds like you should avoid it if possible.
http://vfio.blogspot.com/2014/08/vfiovga-faq.html (Question 8)

Maybe it was addressed by this patch if you are running new enough qemu.

Thank you for the tip about unsafe_interrupts, I tried it without, and it works, updated my original post.

Does anyone happen to know if you can do this with a single gpu? What I am thinking is not binding the gpu to vfio-pci at boot, but running a script that unbinds it from the radeon driver and adds it to vfio-pci at runtime, then starts the vm. As far as I know it doesn't work if the host drivers have touched the card, but I am hopping that I am wrong.

My thoughts exactly.

You can take the card away from host, however when the VM shutdowns the host has to reboot to use the card again. Unlike keyboards and mice or things like that where they are expected to be plug n play

You're right, tried it just now. Unplugged the GPU while linux was running, plugged it back in, no image.

tried it myself before so thats how i knew. if you do things like passthrough say a keyboard and mouse, then when the VM shuts down control of them will go back to the host. but with the GPU, little more difficult and requires full reboot to take control again. who knew operating systems didnt like things like pci express devices being unplugged during runtime lawl

1 Like

Does anyone know if this will work for my build? my current pc is http://pcpartpicker.com/user/doppenshloppen/saved/LwQ6Mp plus a radeon 3650 that I would use as the host. Or does my asus mobo screw me over?

According to the manual it does support IOMMU so that is in your favor, as long as it has the proper IVRS table in the BIOS signature you should be fine, be sure to report back and let us know there is also another thread I started awhile back about known working hardware you should add your hardware to the list.

https://forum.teksyndicate.com/t/pci-passthrough-known-working-hardware

The manual for the MB can be found here....

http://dlcdnet.asus.com/pub/ASUS/mb/SocketAM3+/M5A97_R2.0/E8046_M5A97_R2.pdf

If I'm successful I'll definitely post in that thread.

Even if your not and you determine that the MB is what kept it from working post that part as not working to help others in making choice and avoiding buying something that won't work.

If you have any questions or problems just ask here we will try our best to help you be successful.

If you haven't read this blog it will be helpful to you....

http://vfio.blogspot.com/

Ok, I'll post either way. I'm working on reading that blog while I wait for computers to finish imaging at work.

Edit: Did there used to be a video in the first post because I see that some of the first few posts seem to reference one.

1 Like

The motherboard has support for pci passthrough, I have done it myself (posted in this thread and in the support hardware thread).

Here's the video:
https://youtu.be/EjNcr6oxci4

1 Like

I just installed the release version of Windows 10 on KVM. It is working very well so far.

  • CPU model no longer had to be set to Core 2 Duo. I was able to run the installer and the OS with the CPU set to host-passthrough using a Haswell-E chip.
  • Nvidia driver that came with Windows updates is working well with the passthrough GTX 780. No issues in short graphics stress tests. I'll eventually try some real games.
  • Windows 8.1 64 bit version of recent virtio-scsi and virtio NIC drivers work.
  • Hibernate works.
  • Audio still sucks as before for me and my setup.
2 Likes