Live data from Hacker News

LibVF.IO: Add support for GPU Virtual Machine (GVM)

arccompute.com

11–20 of 57 posts

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#11

GPU can not even run its own OS basically, it's a parallel co-processor, when-should/how-could I use it as a VM?

Most current GPUs could, even with the public programming info. The limitations in interrupt handling would eat into either functionality or performance somewhat I think.

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#13

Is it possible to use this for a remote gpu solution somehow?

That depends on the driver implementation and what exactly the features are that you are looking for. In general if you're using virtualization tools like KVM/Xen you can configure a computer to make virtual machines that can be accessed remotely (for example you would likely want to configure the network to provide your machine with an IP address). You can use GVM for GPU accelerating various programs like those that use DirectX, Vulkan, and OpenGL so if that meets your needs from a remote machine and you have the necessary resources (networking resources such as IP addresses, time and know-how to configure such a setup) then I would say yes.

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#14
post #3

Earlier quoted context omitted.

To be honest with you I am extremely excited by what you are working towards, but utterly beyond confusion when it comes to the GPU virtualization landscape. The walls that vendors have built in this area in their attempt to artificially segment "consumer" and "professional" are shameful. NVidia in particular has been reprehensible. I wish more people cared. Thank you!

Thanks for your kind words! We're all virtualization users ourselves so I definitely get what you mean - we started this project because we wanted to help people to get access to the magic at home using the hardware they already have! I will say though that Nvidia has done a lot towards improving their support for open source. While it might be a bit of an uncommon take in my view many of the folks who probably are m…

Gigachad Arthur

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#15
post #4

What does it do? Does it let one pass a virtual GPU to the guest without complete PCI-passthrough? E.g. will I be able to share host GPU between the host system and guests?

Ya, that's exactly correct. :)

What about one GPU with multiple VM?

Annoying t hing right now is that you have to pony up for the fancy nvidia cards plus insane nvidia licensing for their multiGPU virtualized cards. AMD at least makes you only pay for the hardware but its still super pricey.

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#17

Earlier quoted context omitted.

Ya, that's exactly correct. :)

What about one GPU with multiple VM? Annoying t hing right now is that you have to pony up for the fancy nvidia cards plus insane nvidia licensing for their multiGPU virtualized cards. AMD at least makes you only pay for the hardware but its still super pricey.

Ya, you can use multiple VMs. Here is a video I took of a laptop with LibVF.IO and an early pre-release version of GVM installed - at the start of the video you can see a fullscreen Windows VM and then I back out and open another compartmentalized 'app VM' (browser):

https://streamable.com/gd45bh

Both VMs are actually based on Windows (one simply doesn't have explorer.exe running) and each has it's own virtual GPU attached.

This laptop has a Nvidia graphics processor inside but it also works with laptops that have an Xe Intel graphics processor. I'm hoping at some point it will work well on AMD too.

Re: LibVF.IO: Add support for GPU Virtual Machine (GVM)

#18
post #16

Is this similar to the virglrenderer project? https://gitlab.freedesktop.org/virgl/virglrenderer

It is slightly different - this runs an unmodified GPU driver in the guest (no para-virtualization) and in our observations our performance is close to native which I believe is a fair improvement over the overhead of Virgl. Also there's availability of more APIs - for example DirectX, Vulkan, and OpenGL work with GVM guests. I don't think all of those work with Virgl. We make use of various different assistance modes (either hardware or software I/O virtualization/resource sharing) via VFIO-Mdev (VFIO Mediated Device), or via SR-IOV (Single Root IO Virtualization), or SIOV (Scalable IO Virtualization).

I made this web page to try consolidate some information from various folks who have contributed a lot in this area of open source to show how it works (there are some novel additions we've made as well based on our own work with GVM):

https://openmdev.io/index.php/Virtual_IO_Internals

Post reply on HN