3 ms·
What I miss most in QubesOS is ability to connect my GPU hardware to a specific VM (or app, or container) the way I do the mic, camera, and USB peripherals. I d
by ncmncm 5y ago
What I miss most in QubesOS is ability to connect my GPU hardware to a specific VM (or app, or container) the way I do the mic, camera, and USB peripherals. I don't need it for rendering the browser GUI, where the CPU is wholly adequate, but it would be helpful for e.g. mpv, and as a back-end for OpenCL/OpenMP programs. This seems like it ought to be much easier than trying to share such a GPU with multiple VMs simultaneously.
The problem seems to be how to do it securely. You could imagine faking GPU hardware for the VM image to talk to. But maybe Vulkan would be a better API? Has any work been done on a wrapper forwarding calls that refer to VM-mapped addresses to a native Vulkan? (What happens in WSL2?)
I find Kompute ( https://github.com/KomputeProject/kompute https://github.com/KomputeProject/kompute , https://www.youtube.com/watch?v=Xz4fiQNmGSA https://www.youtube.com/watch?v=Xz4fiQNmGSA ) that seems to be a serious attempt at building general computation infrastructure on top of Vulkan. Is exposing a Vulkan wrapper, and building compute kernels on top of that, a practical avenue?
This all seems like something someone must have throught through already, but I have not found anything published about it.
- pabs3 5y agoConnecting hardware to an app VM seems like a bad idea, better for the hardware to be managed in a specific VM, passing out an audio/video stream then individual audio/video/input streams sent to app VMs. On Linux pipewire is meant to do the audio/video part. I there are probably virtio protocols for GPU stuff, the Spectrum design page mentions one for Wayland.
- ncmncm 5y agoBut I'm not interested in video streams. I want computation.
- fsflover 5y ago> ability to connect my GPU hardware to a specific VM You can do this if you have a second GPU: https://www.qubes-os.org/faq/#can-i-run-applications-like-games-which-require-hardware-acceleration https://www.qubes-os.org/faq/#can-i-run-applications-like-ga... https://forum.qubes-os.org/t/qubes-gpu-passthrough/661 https://forum.qubes-os.org/t/qubes-gpu-passthrough/661 https://forum.qubes-os.org/t/another-2-gpu-passthrough-post/2821 https://forum.qubes-os.org/t/another-2-gpu-passthrough-post/...
- ncmncm 5y agoThanks, I do have. Actually, two, an Intel and an Nvidia, and not using either one.