Public bug reported:

# Summary

Upstream VirGL video acceleration support in virglrenderer requires the
VMM (QEMU) to explicitly enable it by passing the
VIRGL_RENDERER_USE_VIDEO flag during virglrenderer initialization.
Ubuntu currently builds virglrenderer with video disabled (tracked in LP
#2141692). Even after LP #2141692 is resolved, guests will not be able
to use VirGL video acceleration unless Ubuntu QEMU enables (or provides
an opt-in switch to enable) VIRGL_RENDERER_USE_VIDEO.

# Related bug
- virglrenderer build feature request: LP #2141692

# Background / Motivation

VirGL video acceleration aims to expose VA-API video encode/decode
capabilities to virtio-gpu/virgl guests (where supported by host
GPU/driver stack). This can reduce guest CPU load and improve multimedia
and remote desktop streaming responsiveness in VM desktops.
virglrenderer alone is not sufficient: QEMU must pass a runtime flag to
activate the video path.

# Request

Please add support in Ubuntu QEMU to enable VirGL video acceleration by
passing VIRGL_RENDERER_USE_VIDEO when initializing virglrenderer for
virtio-gpu virgl/virtio-gpu-gl.

To minimize risk/regressions, please implement this as an OPT-IN feature 
(default off), e.g.:
- a device property on virtio-gpu-gl / virtio-vga-gl such as "virgl-video=on" 
(naming up to maintainer)
- when enabled, QEMU includes VIRGL_RENDERER_USE_VIDEO in the flags passed to 
virgl_renderer_init()

# Notes / Scope

- This bug is about QEMU plumbing/runtime flag control only.
- The virglrenderer build-time enablement is tracked separately in LP #2141692. 
Both are required for end-to-end testing.

# Evidence / How to verify on Ubuntu

On an Ubuntu host:

1) Enable virglrenderer video feature (via LP #2141692 fix or locally rebuilt 
virglrenderer).
2) With QEMU supporting the opt-in flag, start a VM with virtio-gpu + 
virgl/virtio-gl and set the new property.
3) In the guest:
   LIBVA_DRIVER_NAME=virtio_gpu vainfo
Expected:
- virtio_gpu VA-API driver loads
- Additional codec profiles (decode/encode depending on host capabilities) 
appear vs baseline

# Why opt-in is preferred
- Avoids enabling a newer/less widely tested code path for all users by default.
- Allows targeted testing across Intel/AMD/NVIDIA and different Mesa/driver 
stacks during the 26.04 cycle.
- Provides a clean upgrade path: opt-in now; consider default-on later if 
stable.

# References

- virglrenderer video feature needs VMM runtime flag VIRGL_RENDERER_USE_VIDEO 
(per upstream documentation / common downstream patches)
- Related Ubuntu request: LP #2141692

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2141694

Title:
  Add opt-in support to enable VIRGL_RENDERER_USE_VIDEO for virtio-gpu
  virgl

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2141694/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to