I am asking as to assign a VFs to a VM, it is ok.
The question is next how to use it, to have the display using that virtualized GPU and not the default common one, that gets setup when not using VFs.
I’m trying to figure out how to use it to have accelerated desktop, and not just a GPU available for other tasks.
It really depends on the GPU and what they expose for their VFs.
On AMD server grade GPUs, each VF allows for rendering, so you’d go into the OS, set up something like sunshine/moonlight to share your display and also perform video encoding on the same GPU, then you’d hit the monitor configuration and turn off the built-in virtio-gpu.
But then some of the NVIDIA GPUs for example do not do any rendering, so you see them in the guest but you can only use them for accelerated video encoding/decoding and compute tasks.
I’ve not played with looking glass before, but setups where the VM is running on the same machine as the client, it looks like it could be a good solution.
In my case, I’ve been running those kind of VMs remotely so instead used sunshine and moonlight to get low-latency remote access.