Live data from Hacker News

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

arccompute.com

41–50 of 57 posts

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

#41
post #39
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?

How secure is that? Are users of a GPU completely isolated from eachother? Will there be side-channel attacks possible?

It’s mostly up to the specific hardware and its host-side drivers. I’d say that GPU compute security is a very under-studied area compared with CPU compute.

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

#42
post #31

Earlier quoted context omitted.

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 at…

Sounds very interesting! Do VMs work with a display session (Xorg) too? Some GPU-enabled applications require an X server with a physical HDMI/Displayport attached.

Ya! You can use VMs that use X11 in the guest without issue. X11 also works on the host. Wayland is also working on the host - I haven't tested yet with Wayland guests yet so that's something to try.

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

#43
post #39
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?

How secure is that? Are users of a GPU completely isolated from eachother? Will there be side-channel attacks possible?

GVM uses IOMMU for compartmentalization:

This page has a comparison of the various IO assistance modes GVM can make use of (see comparison of assistance modes, the Mdev Mode section, and the SR-IOV Mode section):

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

This will probably also play a role in future developments like SIOV (Scalable IO Virtualization):

https://lwn.net/ml/linux-kernel/20190222021927.13132-1-baolu...

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

#44
post #39

Earlier quoted context omitted.

How secure is that? Are users of a GPU completely isolated from eachother? Will there be side-channel attacks possible?

It’s mostly up to the specific hardware and its host-side drivers. I’d say that GPU compute security is a very under-studied area compared with CPU compute.

Ya, that's accurate. The precise driver implementation matters a lot. Having said that there are some good 'best practices' that seem to make a difference. In my opinion 'IOMMU Aware Mediated Device' could also make some much needed improvements here as it would allow for more granular IOMMU allocations - perhaps this mode could help further support the 'App VMs' use-case using shared work queues without breaking IO virtual address translation:

https://lwn.net/ml/linux-kernel/20190222021927.13132-1-baolu...

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

#45

I run Linux for software development, but I need to also run Autodesk Fusion 360, which doesn't run on Linux. So I run it in a VirtualBox virtual machine. It works poorly as it sometimes doesn't render correctly and the performance is bad. I know that if I did some research and bought a second GPU that I could maybe get PCI-passthrough working, but I find that obnoxious and wasteful. Can I use LibVF.IO/GVM to get bet…

It depends if your GPU is supported, and such support is mostly beholden to the hardware before anything else. Currently it’s largely limited to: for Nvidia, most Maxwell, Pascal, & Turing cards; for AMD, very few obsolete cards; for Intel, gen 6–9 iGPUs.

We have Ampere support working on some devices (and it is in development on other Ampere devices) as well as 11th & 12th generation Intel Xe. :)

Here's the GPU Support page if you'd like to take a look:

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

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

#46
Can I use this with Proxmox?

I looked into LibVF.IO when it was last posted on hackernews but I was never able to get it to work with Proxmox.

I'm kind of a weirdo and want to use proxmox as a hypervisor on my desktop and manjaro as my daily driver with Windows 10 for Fusion360.

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

#47

What are the practical use cases for this?

While less for general consumer use (honestly most consumers don't use CPU virtualiztion either), this has strong potential in VDI applications. Today with CPU virtualization available everywhere one inexpensive machine can host many VMs all sharing common processing power. If GPU virtualization gains traction this could mean we could be doing the same with GPUs but in an open manner (currently vGPUs are only avaliab…

> honestly most consumers don't use CPU virtualiztion either

Not that they are aware of at least :)

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

#48

Earlier quoted context omitted.

It depends if your GPU is supported, and such support is mostly beholden to the hardware before anything else. Currently it’s largely limited to: for Nvidia, most Maxwell, Pascal, & Turing cards; for AMD, very few obsolete cards; for Intel, gen 6–9 iGPUs.

We have Ampere support working on some devices (and it is in development on other Ampere devices) as well as 11th & 12th generation Intel Xe. :) Here's the GPU Support page if you'd like to take a look: https://openmdev.io/index.php/GPU_Support

Love this project. I nerded out on GPU passthrough several years ago and learned a lot. GPU sharing would be a killer feature for some of my workflows.

Recently, after being a long-time Nvidia customer, for Linux systems I've switched to AMD GPUs and have been very impressed with the amdgpu driver quality relative to Nvidia's proprietary driver. Do you have any thoughts on what the LibVF/GVM future looks like for AMD devices?

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

#49

Earlier quoted context omitted.

We have Ampere support working on some devices (and it is in development on other Ampere devices) as well as 11th & 12th generation Intel Xe. :) Here's the GPU Support page if you'd like to take a look: https://openmdev.io/index.php/GPU_Support

Love this project. I nerded out on GPU passthrough several years ago and learned a lot. GPU sharing would be a killer feature for some of my workflows. Recently, after being a long-time Nvidia customer, for Linux systems I've switched to AMD GPUs and have been very impressed with the amdgpu driver quality relative to Nvidia's proprietary driver. Do you have any thoughts on what the LibVF/GVM future looks like for AMD…

It is my understanding that both NVIDIA and AMD try to lock their vGPU functionality behind enterprise paid features and hardware. it is a big shame really. If people could run vGPUs in Linux at near native speed, the purely Windows market would shrink much quicker.

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

#50

Hey, I'm the co-creator of LibVF.IO and the GVM project. I'd love to hear what you think about our latest release where we added support for GVM components in LibVF.IO. Side note: We also added in support for Libvirt by allowing users to install standalone GVM components via ./scripts/install-standalone-gvm-components.sh.

[deleted]
Post reply on HN