Can I run a VM and play games through it?

I’m looking into iommu and PCI pass-through etc…

My hardware currently is

MSI B450 Thomahawk Max
AMD Ryzen 3700X
5700XT Nitro +
One monitor

Is it possible?

Run windows on bare metal and dabble with Linux in the VM?

I’m after running Linux OS as the main OS as likely Elementary OS.

And using the 5700XT to boot into elementary OS and also be used as a GPU to game through a VM is that possible?

It’s possible but not all that easy to switch a GPU between host and guest. Most sure-fire methods rely on blacklisting the GPU so the host can’t use it at all.

If you’re able to add a second card for the host, you’ll have things a lot easier.

Can that actually be done on my board? It was quite a cheap board.

I mean I can always get a cheap ass card for the host I guess…
But does my board support these iommu group things.

Even if your groups are junk, you can use the ACS override patch to separate things. The Arch Linux wiki has a script to run that will identify your groups.

Even a card in your x1 slot will work for the host, then you can look into advanced things like Looking Glass.

Nvm they are both 16 slots.
Okay i’ll just get a cheap ass GPU cheers!

If that’s what you want to do, get a cheap GPU like a GT 710, put it in the bottom slot, and use it for your main Linux display. You can then setup KVM/QEMU and use your main card for the Windows VM. Plenty of tutorials on the forums for setting that up :slight_smile:

Wasn’t there a some update in linux 4.10 that allowed to pass through the GPU without blacklisting?

There is newer method, like adding vfio-pci as a pre-requirement for the amd / nvidia driver, so the kernel binds the card to vfio first and then the other drivers can’t touch it.

If you SSH into your box from a phone / laptop, you should be able to unbind your GPU from the host driver and bind it to vfio instead.

It’s a lot easier to just get a second graphics card for the host to use.

1 Like