libkrunfw: Add virtio-media driver support - #139
Open
dorindabassey wants to merge 1 commit into
Open
Conversation
dorindabassey
requested review from
MatiasVara,
slp and
tylerfanelli
as code owners
August 11, 2026 09:21
dorindabassey
force-pushed
the
vhost-media
branch
2 times, most recently
from
August 11, 2026 11:32
f21cd9c to
759a9e4
Compare
|
The VIRTIO_ID_MEDIA patch is available in https://lore.kernel.org/all/20260310-virtio-media-id-v1-1-be211bcf682b@redhat.com/ |
Author
|
Thanks Albert! I could pick it up and drop the local patch. |
Add virtio-media driver patches v4 from upstream kernel mailing list to enable vhost-user media device support in libkrun. Also add the VIRTIO_ID_MEDIA preperatory patch. The driver proxies V4L2 operations between guest userspace and the virtio host backend, supporting MMAP buffer sharing through a shared memory region. Changes: - Add patches 0031-0038 from [PATCH v4 0/8] media: Add virtio-media driver (lore.kernel.org/linux-media) - Enable media kernel configs (CONFIG_MEDIA_SUPPORT, CONFIG_MEDIA_CAMERA_SUPPORT, CONFIG_VIDEO_DEV, CONFIG_MEDIA_VIRTIO) Fixes (kernel 6.12 backport): - v4l2_fh_add()/v4l2_fh_del() signature: drop second argument (mainline changed to 2-arg in 6.13+) - kzalloc_obj() does not exist in 6.12: replace with kzalloc(sizeof(*session), GFP_KERNEL) - file_to_v4l2_fh() does not exist in 6.12: add compat macro in virtio_media.h - Kconfig: add ARM64 to depends line (upstream only lists X86 and 32-bit ARM which is dead code with 64BIT) The driver has been tested with rust-vmm vhost-device-media backend and a webcam, capturing video through the full SHMEM MMAP path. Upstream patch authors: Alexandre Courbot <gnurou@gmail.com> Brian Daniels <briandaniels@google.com> Albert Esteve <aesteve@redhat.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
dorindabassey
force-pushed
the
vhost-media
branch
from
August 12, 2026 13:11
759a9e4 to
64d8b4f
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.
Add virtio-media driver patches v4 from upstream kernel mailing list to enable vhost-user media device support in libkrun. The driver proxies V4L2 operations between guest userspace and the virtio host backend, supporting MMAP buffer sharing through a shared memory region.
Changes:
Fixes (kernel 6.12 backport):
The driver has been tested with rust-vmm vhost-device-media backend and a webcam, capturing video through the full SHMEM MMAP path.
Upstream patch authors:
Alexandre Courbot gnurou@gmail.com
Brian Daniels briandaniels@google.com