XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Enhancement: Virtual OpenGL support (Virgl)

    Scheduled Pinned Locked Moved Development
    7 Posts 3 Posters 3.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ForzaF Offline
      Forza
      last edited by Forza

      One of the nice things with QEMU is a feature called Virgl. It uses the VirtIO-GPU driver on Linux guests to proxy OpenGL (and I read soon Vulkan) commands to the hosts GPU. This allows several guests to use HW acceleration using a single GPU on the host. It also allows the host to continue to use the CPU for console output.

      Virgl isn't as fast as a GPU pass-through, but it is much more flexible and easier to manager. I am thinking that in a XCP-ng environment it could allow migrating guests while retaining HW acceleration.

      For now, there is no VirtIO-GPU support in Xen, but I saw some talk from 2016 about it on te Xen mailing lists. https://lists.xenproject.org/archives/html/xen-devel/2016-01/msg03309.html

      I am not thinking it would be an easy task to implement, but it would bring some unique capabilities to XCP-ng and could prove valuable for XCP-ng users, especially if a VirtIO-GPU driver for Windows guests materialise.

      https://virgil3d.github.io/
      https://www.dedoimedo.com/computers/qemu-virgil.html
      https://cgit.freedesktop.org/virglrenderer

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        First, you need virtIO in XCP-ng 😉 (which isn't the case at all yet). However, we have an intern who started to work on that since last week 🙂

        After getting virtIO (if it's possible with a reasonable effort), then we could start to see for the rest of virtIO perks.

        ForzaF 2 Replies Last reply Reply Quote 2
        • ForzaF Offline
          Forza @olivierlambert
          last edited by Forza

          I'm happy to hear you are working on VirtIO since both FreeBSD and Linux guests supports it well these days.

          Obviously this is a big commitment, but I thought I'd post about it anyway in the hopes that it could one day become possible 🙂

          One more thing that would be needed for virtio is spice support. This would actually be pretty cool as it allows piping USB, Audio and VGA to users connecting to the VM's console 🙂

          1 Reply Last reply Reply Quote 0
          • ForzaF Offline
            Forza @olivierlambert
            last edited by Forza

            Hi, how is it going with the virtio stuff? I think it could really benefit the XCP-ng ecosystem to have VirtIO with the possibilities it may bring. For example usermode networking with ovs, virtiofs (file sharing with host/dom0) and of course VirGL

            VirGL is useful because it provides accelerated OpenGL on multiple guests at the same time.Obviously if you run it on multiple guests it affects the performance, but I think it is a trade-off worth having. Most desktop environments on Linux uses acceleraded GL, so it would improve normal desktop performance as well.

            Here is an example of Linux Mint running Unigine Heaven on VirGL over Spice with sound (remote-viewer) over WiFi. The host is an AMD Athlon 3000G 2 core with integrated graphics. The CPU was only $50 when released many years ago - to give some perspective on its performance.
            virgl-unigine-heaven-amd-ryzen300g-over-spice.jpg

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              We are not directly monitoring the virtio stuff in Xen Project, but you should see some progress on the mailing list 🙂

              ForzaF 1 Reply Last reply Reply Quote 1
              • S Offline
                swivvle
                last edited by

                virtIO in xen, now that would be great!

                1 Reply Last reply Reply Quote 1
                • ForzaF Offline
                  Forza @olivierlambert
                  last edited by

                  It might be happening after all 😊

                  https://www.phoronix.com/news/AMD-Xen-GPU-For-Cars

                  https://www.phoronix.com/news/AMD-GPU-Xen-Hypervisor-S3

                  Having virtio gpu with gl/vulkan/dx3d support would be really interesting.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post