I run gentoo host (with dual monitors) and a third monitor on a separate GPU for windows. I bought a laptop with discrete and onboard GPUs, and discovered that the windows VM now lives in msrdp.exe on the laptop, rather than physically interacted with keyboard and mouse. i still can interact with the VM if there's some game my laptop chokes on, but so far it's not worth the hassle for the extra 10% framerate. It's amusing because my laptop has 120hz display, so "extra 10% FPS" would be nice on the laptop but hey, we're not made of money over here.
Oh, i got sidetracked. I have a kernel command line that invokes IOMMU and "blacklists" the set of PCIE lanes that GPU sits on, the kernel never sees it, even when its in use. The next thing that i had to do was set up a vfio-bind script, that just tells qemu what GPU it's going to use. Thirdly, and this is the unfortunate part, since i forgot exactly what i did - there's some weirdness with windows in qemu with a passthru GPU - you have to registry hack some obscure stuff in to the way windows handles the GPU memory.
If i am not mistaken, 95% of all of my issues were solved by reading the ArchLinux documentation for qemu host/guests. My system is ryzen 3600, 64GB of ram, 2x NVME drives + one M.2 Sata drive, a gtx 1060 and a gtx 1070. Gentoo gets 16GB of ram (unless i need more, i just shut down windows or reset the guest memory) and the 1060. Windows gets ~47GB of ram, and the 1070, a wifi card, and a USB sound card. One of the things you quickly realize with guests on machines like this is that consumer grade motherboards and CPUs are garbage, there aren't enough PCIe lanes to, say, passthrough a bunch of USB or SAS/SATA ports, or a dedicated PCIe soundcard, or firewire. If you have an idea that you'd really like to try this out as an actual "desktop replacement" - especially for replacing multiple desktops, i recommend going to at least a threadripper, as those can expose like 4-6 times as many PCIe lanes to the host OS, meaning the possibility of multiple guests on multiple GPUs, or a single "redundant" guest, with USB ports, SATA ports, and pcie sound/firewire/whatever.
Why would anyone do this? dd if=/dev/sdb of=/mnt/nfs/backups/windows-date.img . Q.E.D.
Oh, i got sidetracked. I have a kernel command line that invokes IOMMU and "blacklists" the set of PCIE lanes that GPU sits on, the kernel never sees it, even when its in use. The next thing that i had to do was set up a vfio-bind script, that just tells qemu what GPU it's going to use. Thirdly, and this is the unfortunate part, since i forgot exactly what i did - there's some weirdness with windows in qemu with a passthru GPU - you have to registry hack some obscure stuff in to the way windows handles the GPU memory.
If i am not mistaken, 95% of all of my issues were solved by reading the ArchLinux documentation for qemu host/guests. My system is ryzen 3600, 64GB of ram, 2x NVME drives + one M.2 Sata drive, a gtx 1060 and a gtx 1070. Gentoo gets 16GB of ram (unless i need more, i just shut down windows or reset the guest memory) and the 1060. Windows gets ~47GB of ram, and the 1070, a wifi card, and a USB sound card. One of the things you quickly realize with guests on machines like this is that consumer grade motherboards and CPUs are garbage, there aren't enough PCIe lanes to, say, passthrough a bunch of USB or SAS/SATA ports, or a dedicated PCIe soundcard, or firewire. If you have an idea that you'd really like to try this out as an actual "desktop replacement" - especially for replacing multiple desktops, i recommend going to at least a threadripper, as those can expose like 4-6 times as many PCIe lanes to the host OS, meaning the possibility of multiple guests on multiple GPUs, or a single "redundant" guest, with USB ports, SATA ports, and pcie sound/firewire/whatever.
Why would anyone do this? dd if=/dev/sdb of=/mnt/nfs/backups/windows-date.img . Q.E.D.