libkrunfw: Add virtio-media driver support - #139
Conversation
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/ |
|
Thanks Albert! I could pick it up and drop the local patch. |
759a9e4 to
64d8b4f
Compare
64d8b4f to
35fd5ca
Compare
|
@dorindabassey Any idea why is it failing on aarch64? |
8356d57 to
39da0e6
Compare
There were two separate issues:
These was failing
CI is passing now with both fixes applied. |
|
Btw, it changes nothing, but the commit has made its way upstream: torvalds/linux@2187be2 In case you want to remove the patch here. |
|
about that patch, I'd still leave it here, we're on an older kernel, but we can drop the patch if we update the kernel. |
Add virtio-media driver patches v8 from upstream kernel mailing list to enable vhost-user media device support in libkrun. Also add the VIRTIO_ID_MEDIA preparatory patch and a fix for videodev2.h UAPI header. 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-0036 from [PATCH v8 0/4] 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 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>
39da0e6 to
cd05909
Compare
|
Updated to v8 |
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):
(mainline changed to 2-arg in 6.13+)
kzalloc(sizeof(*session), GFP_KERNEL)
in virtio_media.h
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