Few years ago there was an uprise of blog posts explaining how to run Linux as a primary system and virtualize Windows machine with GPU passthrough for gaming. ~ 1 year ago I took a dive and did a lot of reading and attempts to make it work, the final results made me really happy. QEMU/KVM/VFIO is one of the best software combinations I've ever used.
Witch CPU isolation and scheduling properly setup my Linux part of machine runs Docker with 25 services, while Windows part happily plays games without stutter at the same time.
That said, quite a few gaming companies are anti-virtualization (with reasonings being that mostly those who use it are using it for cheating purposes) and ban your account, without rights to appeal (ex. Rainbow Six). I honestly find this stance blunt and it feels like discrimination. But currently such use of virtualization is really niche, so what one can do?
I've been using VFIO and maintaining a guide for a few years*, then I've realized that VFIO kinda works, but it's not a reliable technology, and I moved (back) to dual boot.
There are very significant pain points, specifically:
1. if one reserves the video card for VFIO, it won't have any power management; this means that it will run hot while doing nothing; in order to work this around:
1a. first has to battle with X, which has an option not-to-take-over-a-card-but-it-takes-it-over-nonetheless
1b. then one can give exclusive access to the graphic card driver, which can be switched out/in when starting/stopping the VM; this unfortunately works, but not reliably
2. the points above apply to nvidia; AMD is worse, as it hasn't supported soft GPU reset until very recently (I think it was added on 5.19 or so)
2a. this means that one starts the VM, then stops it, and most of the times the card will hang
2b. there resize BAR functionality is not supported by VFIO (at least, last year it wasn't), which means, one loses additional performance (I could be ok with it, as the loss is not significant, but performance losses compound)
The problem is that all the points above are not in control of the user; the problems happen at driver level (if, say, there is no reset support, one can't add it out of thin air).
If one uses Nvidia, and they're ok with the card running hot all the time, then definitely, VFIO works wonder. But this lead me to abandon VFIO, as I don't want that (and the alternative of the card having a most-of-the-time-malfunctiong driver was not appealing, either).
I built my current desktop with the whole goal of being a tank of a VFIO setup and I have no regrets. Best of both worlds for me as I used to just have two separate computers.
QEMU/VFIO with Looking Glass is just such an amazing setup for my use cases.
Few years ago there was an uprise of blog posts explaining how to run Linux as a primary system and virtualize Windows machine with GPU passthrough for gaming. ~ 1 year ago I took a dive and did a lot of reading and attempts to make it work, the final results made me really happy. QEMU/KVM/VFIO is one of the best software combinations I've ever used.