On Thu, 2013-12-19 at 01:48 -0500, Stewart Adam wrote:
I am trying to get VGA passthrough working using KVM and VFIO like
described on this  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  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
* kernel-3.12.5-301.fc20.x86_64 (from updates-testing)
* kernel-3.12.5-302.fc20.x86_64 (built with fedpkg from
git, f20 branch w/ patches from comment #23 in  to
fix pci_find_upstream_pcie_bridge bug)
* also tried latest qemu-vfio from git
* 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 vfio-pci,host=00:19.0,bus=pcie.0 \
-device ahci,bus=pcie.0,id=ahci \
-device ide-hd,bus=ahci.0,drive=disk0 \
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.
The "x" in the x-vga option is for eXperimental. It works in some
cases, not others. The archlinux forum thread is the best place to
either get help or commiserate with others having the same problem. The
advice there is largely not distribution specific. The 0x116 BSOD is a
common problem with assigned Radeon graphics, we don't have a solution
yet. Also note that this work is still under development, for the
current "state of the art" you need a 3.13-rc kernel and qemu.git, and
you may need to patch in some Intel graphics fixes for VGA arbitration.
Even then, I have no reason to suspect the 0x116 BSOD is fixed. More
users seem to be having success with Nvidia cards, so if that's an
option for you, it may be the quickest path to results. Thanks,