I have a question about the possibility of having a single GPU being used for both Linux and a VM pass through.
Is this possible? I have a dedicated and an integrated GPU, but my wish is to only use the dedicated as it has the outputs for the three monitors I have. I don't mind having to log out and disable Linux DE while I game as SSH is always possible in case of a catastrophic VM failure.
I tried it out by using some methods pointed out in this article by unbinding the GPU before running the VM. It doesn't work, even though I can rebind the GPU and get it to work.
It does work if I enable the iGPU and run Linux off it, and then run the VM. I was happy I got it working but then when I needed the extra desktop space, I would have to change settings in BIOS and undo changes.
Dual booting is a pain and I don't trust Windows on my hardware. Also dual booting is very slow compared to running a script that starts up win10 in about 10 seconds.
Since you have 3 monitors I don't know what else to say, unless your willing to give up one or buy a board that has 3 video outputs and supports 3 monitors.
But what technical reasons are there to getting this to work?
If I can successfully run a VM, play a game, then shut it down and repeat multiple times. What stops the GPU from being assigned to Linux and run the desktop environment be unbound and running the VM?
It should follow the same path.
The only "logical" reason I find is that when I unbind it from Linux, the card is left in some unknown state while when used exclusively for pass through, once the VM stops it leaves the GPU in a "shut down state". But then this could probably be solved by running the VM a first time to just load, and then turning off the card properly. This is purely conjecture.
So what you are talking about is called virtual GPU, support was added for doing this with Intel CPUs in kernel 4.10. I am not sure your current CPU is new enough to support it. I am really not sure what steps are necessary for doing it either. Might be a good question for @wendell as I know he has talked about once or twice in some L1 content.
I wouldn't say it's conjecture, based on the kernel it's doing what it's designed to do, unless your offering to commit changes to the kernel yourself to make this feature?
Other than that I'm afraid that your wishing for too much here, unless others wish to offer their expertise and prove me wrong.