So we've had a few threads about passing through a GPU to a Windows virtual machine and running that inside/under Linux. I was thinking about demoing this setup:
Linux Host based on Skylake. Everything setup for virtualization, and vt-d, and all that. Linux would be well setup -- for 4k, multiple monitors, etc. Connected to the onboard graphics.
Add-in graphics card, probably an AMD390X, connected via DP to the same 4k display (second input).
A Windows VM would be setup with the pass-through AMD390X to it, and the Logitech MX Master would be paired to the Windows machine through USB and the Bluetooth part of the MX master paired to linux (the MX Master can swap between up to 3 computers with a mix of bluetooth and logitech unifying recievers). The thumb button on the MX master is trapped on windows with a custom program to 'release' the USB keyboard passthrough and on linux, it releases the keyboard and passes it through to windows.
I was also going to show how, if you don't care about gaming on windows, you can run windows apps seamlessly via RDP (rather than the virtualbox passthrough). That's how I run some things that I need on windows.
Windows sandboxed this way really does work pretty well. It is annoying you have to actually power cycle (reboot is not enough) otherwise it'd be easy to shut down/wake up the windows VM w/ and w/o the passthrough GPU.
This method does let you run Linux 100% of the time but having really "solid" windows install for all the windowsy things you need.
You do have to toggle the 4k display between the two inputs (HDMI and DP) but that's not too bad imho. I can probably make an arduino or a teensy toggle inputs for me when I hit that mouse button if nothing else. Possibly if I don't get the usb keyswitch thing working we'll, I'll use use a usb keyboard switcher and an arduino in hid mode to both toggle the display (infrared yay) and transmit the keystroke to toggle displays to the kvm.
It'd be nice if we could pass through the framebuffer over PCIe the way it works with Crossfire on AMD or Optimus on mobile devices. Then Windows/Linux could share a GPU much more easily with full h/w acceleration. I suspect people are being paid not to work on that though (/tinfoil).
With this setup one has the option of:
- Passthrough Graphics -- Steam In Home Streaming from The Windows VM back to Steam on Linux (LOZL!)
- Reboot WinVM w/different config for Virtualized Graphics -- Run apps seamlessly, but no GPU acceleration
- Passthrough Graphics -- Toggle Input and be "in windows" at 60fps. Seamlessly move your mouse from windows to linux on secondary monitor w/Syngergy or something like that.
UPDATE: 2015-08-28
I've run into a problem w/skylake though. I've done this before, but never on skylake, and always with pci stubs instead of vfio. I'd really like to see if vfio/full intel iommu is newer/better/etc. With intel_iommu on and the i915 enable kernel parameters, I get this at boot:
DMAR:[DMA Write] Request device [00:02.0] fault addr 7099000
DMAR:[fault reason 23] Unknown
[ 10.805742] dmar: DRHD: handling fault status reg 2
[ 10.805746] dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 709b000
DMAR:[fault reason 23] Unknown
[ 10.822677] dmar: DRHD: handling fault status reg 2
[ 10.822683] dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 709d000
DMAR:[fault reason 23] Unknown
[ 10.957100] dmar: DRHD: handling fault status reg 2
[ 10.957114] dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 709d000
DMAR:[fault reason 23] Unknown
[ 11.090397] dmar: DRHD: handling fault status reg 2
[ 11.090404] dmar: DMAR:[DMA Write] Request device [00:02.0] fault addr 709d000
DMAR:[fault reason 23] Unknown
I am not sure why. I get a graphical prompt but if I try to do anything, I get a kernel panic and the machine hard locks. I can switch to a text console and continue fine. I'm using arch with kernel 4.1-6something (I think).
I'm going to try intel_iommu=pt and see if that resolves the issue. It resolves the issue, but has it broken my passthrough? Not sure.
I haven't gotten to the part where I actually pass through the Asus AMD 390X GPU, however.
The boot drive is an Intel 750 nvme SSD, and I'm using systemd/loader to boot (not grub2 because..well grub2 seems pretty stupid about nvme devices right now).
Anyone seen anything like this before? The arch forums weren't much help and the 234 page how-to for passthrough has become a bit outdated with the slick new vfio stuff.