First, I understand that that what I am trying to do will break some of the security of Qubes. My personal use case for Qubes is to have a bare-metal client hypervisor with enhanced security for (mostly) development purposes. As such, I am willing to accept some risks. That is why I posted this in “Testing.”
From what I understand, VirtIO-GPU was added to Xen in either 4.15 or 4.17, and if the VMM and guest kernels are compiled with VirtIO support, the guest can use the host GPU for rendering. Xen 4.17 is the default in Qubes 4.2rc4, so I am using that as a base OS. However, documentation is sparse, so I wondered if anyone had tried this or could give me some help.
Without GPU acceleration, Qubes taxes the host system when using multiple monitors, and as a developer, this is an issue for me. So, I followed the Qubes builder instructions with the following changes:
DIST_DOM0 ?= fc37
USE_QUBES_REPO_VERSION = 4.2
- Comment out all components except
I then ran
make vmm-xen linux-kernel. The next steps in my plan would be:
- Package up the
linux-kernelfiles and install them in dom0
- Add the following kernel params to
/etc/default/gruband rebuid with
grub2-mkconfig(this may not be necessary? I found it on this site):
iommu=pt intel_iommu=on pcie_acs_override=downstream,multifunction
- Change my VM from PVH to PV (PV seems to be broken on 4.2rc4?)
- In dom0, run:
qvm-prefs -s [test-vm-name] kernelopts 'device=virtio-gpu-device'
I don’t think that final step is correct - I’m pretty sure the
device argument is supposed to be passed to Xen, xl, virt, or whatever command Qubes uses to launch VMs, but I’m not sure where to modify that.
Any thoughts/feedback/suggestions? What am I missing, and what else would be required to get this to work? If not . . . I may have to leave Qubes after 8 years and homebrew a KVM system to work somewhat like Qubes so I can use my GPU/multiple monitors.
For reference, some basic system specs:
- Dell Precision M6800
- CPU: i7-4910MQ
- RAM: 32GB
- GPU: AMD FirePro M6100*
*I THOUGHT I might be able to get this to work as a passthrough device to a GUI Domain VM (this isn’t a consumer-grade GPU, and I think it is supposed to be supported by Xen). Maybe I need to rebuild my kernel with support for this card? If I can get passthrough to work, I’ll just use that, instead!