[fedora-virt] Issues with VGA passthrough using KVM and VFIO

Stewart Adam maillist at diffingo.com
Thu Dec 19 06:48:22 UTC 2013


Hi,

I am trying to get VGA passthrough working using KVM and VFIO like described 
on this [1] thread and ran into some issues I was hoping someone could shed 
some light on. I have tried various configurations, but can't seem to get it 
working correctly. Either I get "Code 10" device error in Windows, or I get 
a BSOD 0x00000116 (VIDEO_TDR_ ERROR: attempt to reset the display driver and 
recover from a timeout failed) when booting the machine after installing the 
Catalyst 3D drivers. Other users on the Arch Linux forum have also reported 
similar issues.

I have included my hardware, software, and QEMU command-line flags at the 
end of this message for reference.

I tried using virt-manager to create the VM and modified the libvirt 
configuration per the Fedora test case [2] as well as various Q35 machine 
configurations by launching QEMU directly and all resulted in a "Code 10" on 
the GPU device except for when disabling emulated graphics entirely and 
passing x-vga=on. This results in a monitor signal on the card and it seems 
to work very well enough - with kernel 3.12.5 I could even restart the VM 
several times and it all works well *until* I install the Catalyst drivers. 
Then I get the BSOD 0x116 right after the Windows splash-screen. Safe mode 
and system repair still work correctly.

There are no errors on the console or in dmesg, and I can provide that 
output in a pastebin if required. Is this indicative of a hardware problem, 
or a bug in the Catalyst drivers? Is there anything I can do to help debug 
this? I'm happy to provide any information necessary.

Here's some background information about my software configuration:

  * Host: Fedora 20 with virt-preview repo
      o kernel-3.12.5-301.fc20.x86_64 (from updates-testing)
      o kernel-3.12.5-302.fc20.x86_64 (built with fedpkg from git, f20
        branch w/ patches from comment #23 in [3] to fix
        pci_find_upstream_pcie_bridge bug)
      o qemu-kvm-1.7.0-1.fc20.x86_64
          + also tried latest qemu-vfio from git
      o libvirt-daemon-1.2.0-1.fc20.x86_64
  * Guest: Windows 7 SP1 x64

And now the hardware:

  * Xeon E3-1225 v3 (has VT-d, VT-x)
  * SuperMicro MBD-X10SAE-O
  * Sapphire Radeon R9 270X

This is the QEMU command-line to boot the machine:
     /usr/bin/qemu-system-x86_64 -machine accel=kvm -name win7 -S -M q35 -m 
2048 -cpu host \
     -rtc base=localtime -realtime mlock=off \
     -smp 4,sockets=1,cores=4,threads=1 \
     -bios /usr/share/qemu/bios.bin -vga none \
     -device 
ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
     -device 
vfio-pci,host=01:00.0,bus=root.1,addr=0x00,multifunction=on,x-vga=on,romfile=/home/sysadmin/vm/R9270X.rom 
\
     -device vfio-pci,host=00:19.0,bus=pcie.0 \
     -device ahci,bus=pcie.0,id=ahci \
     -drive file=/home/VMs/win7-q35-ahci.img,id=disk0,format=qcow2 -device 
ide-hd,bus=ahci.0,drive=disk0 \
     -boot menu=on

I have omitted passing through the HDMI audio device, although including it 
and/or moving it to pcie.0 as suggested by some users in the Arch Linux 
thread didn't make any difference. Tried with and without romfile, also no 
difference. I did clean Windows installs with each attempt. PCIe 00:19:00 is 
a network controller.

Thanks,
Stewart

[1] https://bbs.archlinux.org/viewtopic.php?pid=1361071
[2] 
https://fedoraproject.org/wiki/QA:Testcase_Virtualization_KVM_PCI_Device_Assignment#Expected_Results
[3] https://bugzilla.kernel.org/show_bug.cgi?id=44881

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/virt/attachments/20131219/78a80ed3/attachment.html>


More information about the virt mailing list