<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi, I've been working to get VGA passthrough working for a Windows 7 VM for the past few days. My setup is as follows:<br><br></div>Processor: I7-3960X<br></div>Graphics: 2 NVIDIA GTX 580's and one NVIDIA GT 420<br></div>Monitors: 1 Monitor hooked up to the 420, 1 monitor hooked up to both 580's<br>Motherboard: ASUS Rampage IV Extreme<br></div>OS: Arch Linux<br></div>Kernel: Standard, 4.4.1<br></div><div><br></div>My end goal is to bind one 580 to the VM and the other to Arch. The 420 is just to allow X to start initially since I haven't found a way to disable only one 580(They have the same vendor and model ID) at a time. I was initially following <a href="https://www.reddit.com/r/pcmasterrace/comments/3lno0t/gpu_passthrough_revisited_an_updated_guide_on_how/">this guide</a>. My guest card was in its own IOMMU group and I'm not using integrated graphics so from what I understand I don't need the patched kernel. My cards bound to vfio-pci fine, but I got stuck when I realized that the GTX 580 doesn't support UEFI booting. I changed over to booting with Seabios but any time I've enabled "x-vga=on" QEMU just hangs. The QEMU monitor window freezes, there is no video output to my other monitor, and the only way to get out of the window is to force close it in htop. It uses 0% cpu during this. The only log put out into dmesg is "kvm: zapping shadow pages for mmio generation wraparound" which looks fairly unrelated from my searches.<br><br></div>I've tested the following things:<br></div>Enabling vga cirrus and x-vga - Opens an empty, black graphical window, still hangs<br></div>Enabling vga cirrus and no x-vga - Boots as expected, but obviously no passthrough<br></div>Passing in a ROM for the graphics card - Hangs<br></div>Enabling unsafe interrupts - Hangs<br></div>Using linux-vfio kernel from AUR - Hangs<br></div>Lowering RAM (based on <a href="https://bugzilla.kernel.org/show_bug.cgi?id=107561">this post</a>) - Hangs<br><div><div><div> <br></div><div>Here are my boot options, booting using rEFInd:<br></div><div>"root=UUID=4accaa3c-6d16-40e9-bb95-e78d160962a5 ro intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=10de:1080,10de:0e09"<br><br></div><div>The two pci-stub ID's are for the GTX 580 and its audio card, it disables both 580's.<br><br></div><div>Here is my QEMU startup script:<br><pre>qemu-system-x86_64 -enable-kvm -m 1024 -cpu host,kvm=off \
-smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin  -vga none \
-device vfio-pci,host=02:00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=02:00.1 \
-drive file=/mnt/LinuxStorage/VMs/VGAWin7.qcow2,id=disk,format=qcow2,if=virtio \
-boot menu=on \
</pre>At this point I don't know of any log files to look at so I'm essentially taking shots in the dark. Are there any other logs that could be useful? Has anyone else experienced issues like this? I've done a lot of searching around and haven't come across anyone who has had this kind of hang without an error message. Any ideas would be appreciated, thanks.<br></div><div><br><br></div><div><div><div><br><div><div><br><br></div></div></div></div></div></div></div></div>