vhost-device-gpu: Add blob resource support and Venus capset for virglrenderer backend - #988
Open
dorindabassey wants to merge 9 commits into
Open
vhost-device-gpu: Add blob resource support and Venus capset for virglrenderer backend#988dorindabassey wants to merge 9 commits into
dorindabassey wants to merge 9 commits into
Conversation
dorindabassey
requested review from
epilys,
stefano-garzarella,
stsquad and
vireshk
as code owners
August 3, 2026 16:11
dorindabassey
force-pushed
the
blob-resources-v3
branch
2 times, most recently
from
August 4, 2026 09:35
c5cc017 to
015a08c
Compare
Collaborator
Author
|
CI failing, passing depends on - rust-vmm/rust-vmm-container#149 |
4 tasks
dorindabassey
force-pushed
the
blob-resources-v3
branch
from
August 5, 2026 09:11
015a08c to
d42b094
Compare
Update virglrenderer-rs to pull in new API wrappers needed for Venus support: context_create_fence, context_poll, and export_resource_dmabuf. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Instead of hardcoding the capset indices, lookup the capset index dynamically based on the configured capsets in the config. Convert the capset bitmask to a capset ID using trailing_zeros() since bits() returns a power-of-2 bitmask, not the capset index. Signed-off-by: Matej Hrica <mhrica@redhat.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Dispatch to context_create_fence() when the guest sets VIRTIO_GPU_FLAG_INFO_RING_IDX, and poll per-context fences in event_poll(). This is required for Venus multi-timeline fence signaling. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Implement blob resource support and shared memory mapping. This is
required for Venus support and gfxstream-{vulkan, gles} enablement.
Updated to use vhost 0.17 and vhost-user-backend 0.23 for shmem.
Added UUID field initialization for blob resources using Uuid::new_v4().
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Co-authored-by: Dorinda Bassey <dbassey@redhat.com>
Expose Venus capability set support using the virglrenderer backend, enabled by the new blob resource support. Signed-off-by: Matej Hrica <mhrica@redhat.com>
The test was trying to obtain capset info for 3 capsets, but only 2 were configured. The test previously passed because the virgl backend incorrectly returned information for the additional capset. Now with 3 capsets (VIRGL, VIRGL2, VENUS), update the test to properly iterate over all configured capsets. Signed-off-by: Matej Hrica <mhrica@redhat.com> Co-authored-by: Dorinda Bassey <dbassey@redhat.com>
Use String::from_utf8_lossy() instead of CStr::from_bytes_with_nul() since the virtio-gpu driver sends debug_name without null terminator. Signed-off-by: Matej Hrica <mhrica@redhat.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Configure virglrenderer based on the user's capset selection. Enable virgl renderer if VIRGL or VIRGL2 capsets are requested, and Enable Venus/render-server if VENUS capset is requested. Signed-off-by: Matej Hrica <mhrica@redhat.com> Co-authored-by: Dorinda Bassey <dbassey@redhat.com>
dorindabassey
force-pushed
the
blob-resources-v3
branch
2 times, most recently
from
August 10, 2026 10:22
7e7cd16 to
da3259f
Compare
Add the blob_alignment field to VirtioGpuConfig to match the virtio-gpu spec. Set it to the system page size. This is a new config introduced in the spec and QEMU. Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
dorindabassey
force-pushed
the
blob-resources-v3
branch
from
August 12, 2026 11:11
da3259f to
d9746df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the PR
Implement blob resource creation, mapping, and unmapping for the
virglrenderer backend, using SHMEM_MAP/UNMAP via vhost-user-backend.
This also adds per-context fence support needed for Venus multi-timeline
signaling, dynamic capset index lookup, and Venus capset exposure.
Tested with vkcube in a QEMU guest. Testing with QEMU requires the
vhost-user-gpu SHMEM support patch:
https://lore.kernel.org/all/20260717134920.265128-4-dbassey@redhat.com/
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafecode is properly documented.