Skip to content

Instantly share code, notes, and snippets.

@maikelwever
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maikelwever/396f6f85543f8fbf7c76 to your computer and use it in GitHub Desktop.
Save maikelwever/396f6f85543f8fbf7c76 to your computer and use it in GitHub Desktop.
The definitive guide to vga-passtrough with VT-d

The definitive guide to vga-passtrough with VT-d

This guide can also be reached under the shortlink: http://bit.ly/vt-d which may be useful once you are in your VM.

Ensure you have hardware support for VT-d and VT-x. In your host bios, set 'init display first' to 'iGPU'. Otherwise your AMD gpu will get initialized.

Follow the guide at: https://bbs.archlinux.org/viewtopic.php?id=162768

Note that the GPU audio device needs a different line. Change:
-device vfio-pci,host=01:00.1,bus=root.1,addr=00.1
TO THIS:
-device vfio-pci,host=01:00.1,bus=pcie.0

This only needs to be done for the audio device, mostly 01:00.1 (so not 01:00.0).

I recommend you put your QEMU boot string in a batch file, and version that (v1.sh, v2.sh) so you can revert if needed.

Install Windows in your VM. It is advised you install at least the 'Pro' edition, so you can install the rebootscripts (gpedit.msc is needed). If you are installing Windows 8, add a '-net none' to the QEMU command, so you won't have to make a Microsoft account. You can remove this when done, then QEMU will default to a NAT network device (does not support IMCP).

It appears if you have a 'NoSoftRst-' function on your GPU, you won't need rebootscripts. If yours comes up as 'NoSoftRst+', you probably do. This guy made a fix in his blogpost, you can skip the Xen specifics, it's about the rebootscripts. You can find it here: http://blog.ktz.me/?p=219

You can check if your GPU has this flag by running 'sudo lspci -vvvv' on your host.

The download link for the scripts is broken, so here's a proper one: http://blog.ktz.me/wp-content/uploads/2013/09/rebootscripts.zip

You should be able to install the usual AMD drivers in your VM. Note that we found that the 'Accelerated Video Transcoding' thingy is broken, so don't install that. After the installation and a reboot, I installed 'Catalyst Control Center', which appears to be working just fine.

These are all the notes I have. If you have something to add, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment