AMD Expands Mesa Virgl Video Acceleration For Using On Xen

Written by Michael Larabel in Mesa on 19 July 2023 at 05:02 AM EDT. 4 Comments
MESA
As part of AMD's interest in improving graphics around Xen virtualization for in-vehicle infotainment systems and other customer uses, AMD engineers have expanded the video acceleration capabilities provided by Mesa's Virgl code.

Huang Rui with AMD has added some additional video codec support for Virgl to enjoy video acceleration under Xen virtualization with QEMU.

The code that's been merged for Mesa 23.3 notes:
"Currently, there are a small number of video formats in mesa that can be hardware accelerated decoding in VM, and these patches are aimed at adding more video formats to let them can be hardware accelerated decoding.

Those formats are added: mpeg12, vc1, jpeg, hevc10bit and vp9. Different virgl_picture_desc structures are added in virgl_video_hw.h, parameter will be bypassed into virgl_picture_desc in different fill_picture_desc function.
Virtio gpu libva backend will bypass all the video parameter and command into virglrenderer, it will call the host libva to decode video and feedback the results back to the guest. Therefore, this modification should be used with the relevant modifications in virglrenderer to take effect. And for qemu part, function get_drm_fd callback is added to let the guest OS can get render node.

Currently, many video decoding formats have been added, but the efficiency of decoding in the VM is not very high. This is mainly due to the inefficient video data transmission method between the host and the guest. In the future, blob memory may will be used to improve the efficiency of video decoding."

It's nice to see VP9 hardware decoding for Virgl along with JPEG, HEVC 10-bit, VC1, and MPEG12 decoding all now in place. AMD shared this screenshot of their Xen+QEMU video acceleration success:

video acceleration on Xen with Virgl


Great to see these upstream improvements happening with graphics/video acceleration on Xen not nearly being much of a focus compared to KVM by many parties.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week