Live data from Hacker News

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

arccompute.com

51–57 of 57 posts

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

#51

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.

Awesome project!

And I gotta say thats some pretty code for dealing with a bunch of sysfs stuff: https://github.com/Arc-Compute/LibVF.IO/blob/master/src/libv...

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

#54
post #52

What's the recommended GPUs with best performance:cost?

That depends on your use-case. In general I would recommend you consider purchasing Nvidia's GPUs for the best price/performance and GVM support. Intel's Xe architecture is currently improving but the performance isn't quite there for a number of use-cases however some appear to work quite well and I expect that will improve with time. The 2080Ti works well with current software. If you are a developer and would like to help us improve support for devices you can purchase a 3090Ti (support in GVM for this device is under active development).

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

#55

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.

Awesome project! And I gotta say thats some pretty code for dealing with a bunch of sysfs stuff: https://github.com/Arc-Compute/LibVF.IO/blob/master/src/libv...

Thanks!! We do our best to keep the code as clean/readable as possible. The first version was a bit of a mess but we rewrote it again clean slate to improve over the first implementation. :)

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

#56
post #47

Earlier quoted context omitted.

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 :)

I was thinking this over in the past couple days and I think the words 'that they are aware' is really key here.

Ideally if GPU virtualization were sufficiently widespread as is support today for Intel VT-d, and AMD-v (IOMMU APIs for hardware assisted CPU virtualization) then software could make use of these functions without the user being aware of it. We're in a situation similar to that of CPU virtualization without hardware assistance with the early Xenoservers project from Cambridge (what would later become the Xen hypervisor and XenSource company). At that time there was not widespread support for virtualization assistance on most CPUs, and as a result Xen used methods like ring de-privileging to place the entire guest in ring 3 (userspace and kernel) while the hypervisor ran in ring 0 in order to virtualize any ordinary CPU model - my understanding is these were known as PV-guests (paravirtual guests). Over time however CPU companies began to introduce widespread support for features like VT-d and AMD-v to all of their models of CPU which enabled VM-exits/context save-restore with the use of shadow registers rather than ring de-privileging while Intel added new 'virtualization enhancements' through feature suites like vPro (SGX2 for example) which were only available on certain models of CPU (for example Xeon devices). Xen would adopt VT-d and AMD-v as HVM-guests (Hardware assisted virtualization) as they became more common on ubiquitous hardware and at the same time commercial forks of Xen would take advantage of these vPro features (like SGX2) for enterprise and high security government use-cases:

https://wiki.xenproject.org/wiki/Xen_Project_Software_Overvi...

Like before (around the time of the Xenoservers project) today we can effectively virtualize the GPU without hardware assistance mechanisms:

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

https://openmdev.io/index.php/Virtual_I/O_Internals#Mdev_Mod...

Since it's now practical to virtualize any GPU device (as was the case in the past with early Xen on CPUs supporting virtualization for various use-cases regardless of whether or not the hardware provided assistance mechanisms) it might then be time to start moving to a new paradigm of 'enterprise' vs. 'consumer' - in other words new 'virtualization enhancements' (similar to vPro on Intel's Xeons, ect..) are developed for enterprise GPUs (for example shadow page deduplication in VRAM, import/export of redundant objects between IO Virtual Address buffers, IOMMU protected balloon/deballoon, ect..) and basic hardware assistance mechanisms like SR-IOV & SIOV are enabled by default, across the board:

https://openmdev.io/index.php/Virtual_I/O_Internals#SR-IOV_M...

https://openmdev.io/index.php/Virtual_I/O_Internals#SIOV_Mod...

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

#57

Earlier quoted context omitted.

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

Can I run CUDA in the guest OS (Windows)?
Post reply on HN