To be clear, I don't think very many people are likely to have to deal with this as a security problem. I just think its appropriate to be aware of the power/danger inherent in the seemingly benign nature of GPU/PCI passthrough.
[1] = "you can use PCI passthrough to assign a PCI device (NIC, disk controller, HBA, USB controller, firewire controller, soundcard, etc) to a virtual machine guest, giving it full and direct access to the PCI device" (http://wiki.xenproject.org/wiki/XenPCIpassthrough) [2] Sorry, I can't find a link.
my setup passes through a discrete PCI-Express graphics card to Windows running under KVM, and the card is restricted to address space allocated to the VM using the motherboard's IOMMU.
Xen documentation explicitly states how to determine whether you have IOMMU on your hardware.[2] The hardware listed here [3], while out of date, conspicuously notes, for example, that "Core i7...most "K" versions don't support VT-d", which, according to Intel [4], means that the i7-4770K, for example, does not support IOMMU (VT-d). This tells me that if you are concerned about this issue, then you must check your hardware, even if it is new hardware.
[1] = https://en.wikipedia.org/wiki/IOMMU
[2] = http://wiki.xenproject.org/wiki/Xen_PCI_Passthrough#How_can_...
[3] = http://wiki.xenproject.org/wiki/VTdHowTo
[4] the i7-4770K probably lacks IOMMU because it would negatively affect performance on a CPU that is sold as a near top-of-the-line CPU for gaming, which generally excludes most virtualization use cases.
edit: formatting
That'd be pretty good
[1] = http://ark.intel.com/products/75123/Intel-Core-i7-4770K-Proc...
"VT-d Pass-Through is a technique to give a domU exclusive access to a PCI function using the IOMMU provided by VT-d. It is primarily targeted at HVM (fully virtualised) guests because PV (paravirtualized) pass-through does not require VT-d (altough it may be utilized too)."[1]
Had to roll back to windows for the host to make the VMs work nicely. A bummer, considering moving away from Windows takes that first step and I now have to stick around for longer. Perhaps next year...
But as you have said, it's not as straighforward as I'd like. I haven't tried it yet but it's nice seeing others having success.
Are there any up to date guides and best practices for this?
https://www.reddit.com/r/linux_gaming/comments/2z2y7h/gpu_pa... is another fairly concise guide (a little out of date though).
https://bbs.archlinux.org/viewtopic.php?id=162768 is the main point of discussion for it - too much to read through entirely, but the top posts include a lot of info, and it contains a lot of valuable information on quirks for specific hardware if you search. Some of the stuff is outdated though (eg the kernel includes a lot of the patches now), and it's targetted at Arch, but most instructions should apply to any distro.
Another key point is, you need VT-d/IOMMU support on your motherboard and CPU, which isn't universal (only in the last few generations of intel CPUs, with some excptions that don't support it. And motherboard support can vary between OEMs). Check https://docs.google.com/spreadsheet/ccc?key=0Aryg5nO-kBebdFo... to see if others have had any luck with your hardware, or before making any purchases.
This could work with two nvidia based cards ? And when the VM isn't On, the host could use the main GPU ?
Someone share more info about this!
You can't switch a GPU between host and VM without rebooting, you have to assign one GPU to the VM through kernel boot options, which will hide it from the host.
A lot of people also just use a dedicated (Nvidia/AMD) GPU for the windows VM for gaming and heavy duty things, and only use their onboard Intel GPU for the linux host, which is sufficient for normal usage if you're doing all your gaming through the VM anyway.
See my post above for some links with more info.
I recently switched from OSX to Linux on the new Dell XPS 13 and I'm not sure if I should stay with my current dual boot setup, use a VM or get rid of window completely and invest time in learning Gimp and Scribus as alternatives.
I can't comment about Photoshop or Illustrator as I have no experience using those programs, though I do a fair bit of work with PCB CAD tools: OrCAD, EAGLE. I haven't ran into any major issues thus far. Media playback works fine btw; mpv does not report any skipped frames when playing 1080p webm files downloaded from Youtube with youtube-dl.
https://www.reddit.com/r/pcmasterrace/comments/2z0evz/gpu_pa...
http://vfio.blogspot.fr/2015/05/vfio-gpu-how-to-series-part-...
Or search for "windows vm gpu passthrough" on your favorite search engine, there may be more.
I use qemu/kvm, with OVMF for the firmware to get around some VGA problems, and pass a discrete card to the guest while using the integrated intel graphics for the host. It requires CPU and motherboard support, but those aren't too uncommon on newer hardware.