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

stuff

15 Likes

Thank you for the video and your effort to explain, I have a couple questions if you don't mind...

So you didn't have to do anything like PCI-Stub?VFIO? or did OpenSuse do that for you? Which version of OpenSuse did you use and which kernel? How is the video card being isolated from the host? I'd guess that it's being isolated in grub.

I'm running Fedora 22 and I'm very close to accomplishing the same thing but it's much more complex or more steps then you went through, maybe it would be worth my effort to just move to OpenSuse if it's that easy.

IOMMU is what isolates the hardware. Didn't have to mess with VFIO or PCI-stub. I used Opensuse with it's stock desktop 3.16 kernel. Nothing too fancy.

It will get a little crazier when I add in a fury and have to give it the primary PCIe slot for x16 lanes

So I saw you had Steam loaded have you played anything in the guest through Steam, if so I'm guessing it played fine...no latency?

The card is very weak I am passing through (hd4550 )but I did get it to run civ 5. when I get a fury I will be benchmarking it.

ok..thank you for your answers, even though it looks much easier I think I'll keep pluggin' away with Fedora, like I said I'm very close I just need a Saturday with nothing else to do and devote the day to it and I think I'll have it.

I've pulled this off with Linux mint host and a windows 10 tech preview guest. I ran a couple benchmarks to validate it was stable. It is a really fun project to get working

1 Like

What cpu/gpus did you use?

FX-8350 on an MSI 970A-G46. Host gpu was a GTX 970 and guest gpu was a Radeon HD 7850. I was not successful in getting the GTX 970 to pass through but I also didn't dig to deeply into it. Radeon was few clicks, and install the driver. Worked fine

Whenever I try to do this, dmesg gets flooded with the following:

vfio-pci 0000:01:00.0: BAR 0: can't reserve [mem 0xe0000000-0xefffffff 64bit pref]

Does anyone here know what is causing this and what to do about it?

Thank you.

CPU: Intel E5-1650V3, Motherboard: Asrock X99 Fatal1ty Killer, GPU: Radeon HD7970

Do you only have one GPU?

Yes, I'm trying to run it on a headless server (the GPU was used for initial installation and then disabled) and use RDP for administration and Steam In-Home streaming for playing games.

Did you disable the GPU in the boot options?

Dude I love you, tried this on Arch Linux but to no avail, a bit over my head but this seams do able, thank you so much for the guide, will switch to Linux forever if I can get this to work.

I blacklisted the radeon module, added the gpu and it's audio device to pci-stub, and bound the gpu and it's audio device to vfio-pci by copying their id's to /sys/bus/pci/drivers/vfio-pci/new_id

Even though I am not a Linux user this video was well thought out. You explained everything well and to the point. I will do this sometime in the summer. Might make me go Linux only.

1 Like

Your basically where I'm at on Fedora 22 (except I'm using the workstation and have two gpu's), pretty much the same, I'm not getting the 2nd card isolated for some reason, I can pass it through and it works for a few seconds then locks up the host and guest forcing a hard reset, I added the settings to grub but I'm missing something and it's something small I'm just not sure what it is....yet! :)

I don't know if this will help you but it might be worth a look....

http://vfio.blogspot.com/

Thanks, I'll look that over for anything I might have missed. I'm mostly following my distro's (Arch) documentation. Are you getting the same error I'm getting in your dmesg?

Yes that where the error is but I'm not sure it's the same syntax, as easy as @lessershoe made it look on openSuse I'm tempted to switch but I like a challenge and really it's been a lot of fun learning, it took me a couple tries before I figured out how to add more storage than the default 20gig the VM wants to use I had a 500gig drive I wanted to use the entire drive for the Win7 VM, like I said took a little tinkering but got it all set up now....the gpu is my only problem and I'm sure I just missed something small. I used the info from the link I posted above to get as far as I have.

One other piece of information I should have included: when I try to boot windows 10 (insider preview) the blue screen gives the following error: SYSTEM_SERVICE_EXCEPTION (atikmdag.sys)