Virtual Machine - VGA Passthrough difficulties with 2 Identical GPUs

Hi Guys,

I'm fairly new to Linux and KVM in general, so my apologies if this is a dumb question.

I am running Linux Mint 17, and have been trying to activate VGA Passthrough after
being inspired by Wendell's "GTA V on Linux" video.

System Hardware:

  • Intel 4820K (Socket 2011) [ Note: No Internal Intel GPU]
  • Two Video Cards - Both Gigabyte Nvidia GTX 980 Ti's
  • Gigabyte X79 Extreme Motherboard (Supports Vt-x, Vt-dl. Both enabled)


What I would like to do is dedicate one graphic card to my host system, and one to a guest
Virtualbox Windows 7 system.


According to my research, I believe I need to create a pci-stub for the graphics adapter that is reserved for my guest system so that iommu can create a mapping to it. The problem is that both my video cards are identical, and so have the same stub id (i.e. the vendor and device types are the same).

Is there a solution whereby I can differentiate one card from the other, so that I can create a stub for one video card only? If not, what is the best way of achieving my goal of allocating my first video card to a host system, and having my second card available for a guest one.

Thank you.

part of the problem is actually with mint. i did the stuff before on mint but had to build qemu from source. also had issues with getting kvm signatures. which means nvidia drivers were disabling the card on startup

Hey man if you are running Mint then you are very close to Ubuntu.
Check out this guide

To your original point. The pci-stub is not required to pass through the hardware, it is used if you cannot blacklist the drivers that are assigned. If you can blacklist the drivers then pci-stub is not required.

So when you setup your pci-stub config you are going to point to the PCI Bus ID for the pass-through card. When you run your VM config script vifo-pci will grab the stub device and apply the drivers. Linux will also not apply the NVIDIA driver to the device that is listed in pci-stub.


@rockking, can he not just add the upstream repos that have all these packages for 14.04 in Mint 17? Excuse me if I am wrong on this I am a Red Hat guy and not as familiar with deb-based distros.


Thank you for the link. I found the same one earlier today. My stumbling block with it, is that:

  • Both cards are nvidia so I don't want to blacklist the vendor because both cards would be affected.

  • Both cards are exactly the same vendor and pci device. So the stub id is the same (see below). When I add the stub, both cards will be applied instead of only one.

$ lspci -nn | grep NVIDIA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] [10de:17c8] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fb0] (rev a1)
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] [10de:17c8] (rev a1)
02:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fb0] (rev a1)

Hm that is odd.
I mean I could be mistaken on a few things about how this all works lol.
Hmm People have done it with your config so Ill see if I cannot dig up anything,

As far as I know unless you can isolate one of the cards based on the pci slot its in ie 01:00.0, 02:00.0, pci-stub will isolate both cards because of the same ID, I have the same issue because I have two identical 270's made by Asus, but I have a third 270 made by Sapphire that has a different ID that I was able to isolate and pass through....I'm not sure what the work around might be, my plan this winter is to pass the identical 270's in crossfire to the guest but I'm a few months from getting to that project so I"m also interested in any solution you might find.

Thanks for your feedback.

After researching the topic, it appears that the Xen Project is capable of isolating video cards based on the pci slot id (e.g. 01:00.0, 02:00.0, etc). So isolating one of two of the exact same video card for virtualization should not be an issue there.

Since I don't feel up to reinstalling linux and windows under Xen, I've decided keep my grub dual booting them for now.

1 Like