QEMU with VirtIO GPU Vulkan Support

(gist.github.com)

134 points | by GalaxySnail 6 hours ago ago

20 comments

  • jamesu 4 hours ago

    It's nice to see support for vulkan in qemu actually getting somewhere, being able to run modern accelerated workloads inside a vm (without dealing with sr-iov) is pretty cool and definitely has some use cases.

  • jakogut 2 hours ago

    Features like this are why I prefer using QEMU directly rather than an abstraction like libvirt on top of QEMU.

    Graphical interfaces like virt-manager are nice at first, but I don't need an abstraction on top of multiple hypervisors to make them all look superficially the same, because they're not. Eventually the abstraction breaks down and gets in the way.

    I need the ability to use the full capability of QEMU. I'll write a shell script to manage the complexity of the arguments. At least I don't have to deal with XML, validation, and struggling with enabling the options I want that are only supported by one specific emulator, which libvirt doesn't support, because it's not common to all of the backends.

  • throwaway48476 2 hours ago

    This isn't SR-IOV which is a hardware feature for virtualizimg GPUs. The problem is the OEMs that gate this feature for enterprise products. Few people buy them so the state of the software ecosystem for virtual GPU is terrible.

    • 0xcde4c3db 2 hours ago

      You don't even necessarily get it with enterprise products; last time I checked, Nvidia requires additional CAL-type licenses installed on a "certified" server from the "Nvidia Partner Network", while AMD and Intel limit it to very specific GPU product lines targeted at VDI (i.e. virtualizing your employees' "desktops" in a server room a la X/Citrix terminals).

  • rafaelmn 4 hours ago

    So this seems to be about enabling a Linux VM use Vulkan on a Linux host qith Vulkan support ?

  • doctorpangloss 3 hours ago

    Does this mean graphics workloads using Vulkan can be isolated and share most GPUs securely?

  • crest 2 hours ago

    At that point just run the code inside a chroot with a full /dev and call it good enough. No common GPU driver, firmware or hardware was designed to securely run really untrusted code from multiple tenants.

    • mappu an hour ago

      WebGL / WebGPU are a somewhat safe subset. Or at least safe enough that Google will keep funding multi-million pwn2own bounties for Chrome with WebGL / WebGPU enabled.

  • C-x_C-f 2 hours ago

    Ignorant question—how's this different from qemu-virgl? I've been using the latter (installed from homebrew) for the last few years passing --device virtio-vga.

    • SirGiggles an hour ago

      Virtio-GPU Venus is similar to Virgl except it passes through Vulkan commands rather than OpenGL

  • shmerl 3 hours ago

    Looking forward to KDE Plasma implementing Vulkan rendering and then it would run in qemu/kvm with GPU acceleration over Vulkan rather than OpenGL.

    • rescbr 32 minutes ago

      You can use Zink (https://docs.mesa3d.org/drivers/zink.html) to translate OpenGL to Vulkan.

      I have even used it in Windows to make a legacy proprietary OpenGL application work properly with recent Windows versions + a mobile (now unsupported) AMD GPU.

  • cwbriscoe 4 hours ago

    Unfortunately my distro is at linux version 6.8. Looking forward to trying it out someday.