[PATCH] drm/virtio: Support partial maps of GEM objects
Sasha Finkelstein
fnkl.kernel at gmail.com
Sun Jan 19 20:42:17 UTC 2025
On Sun, 19 Jan 2025 at 21:02, Dmitry Osipenko
<dmitry.osipenko at collabora.com> wrote:
> I've tested this patch. Partial mapping with a non-zero offset doesn't
> work because drm_gem_mmap() rejects it. I'd want to see your sample code
> that performs mmaping, maybe I'm missing something.
The entire setup is a huge pile of moving parts, but here is the relevant
function that creates a fd from the cross domain info (this is a part
of the vm agent)
https://github.com/WhatAmISupposedToPutHere/krun/blob/pipewire/crates/muvm/src/guest/bridge/common.rs#L745
After the fd is created, it is passed to a pipewire client running
inside the vm,
which in turn does a simple mmap() (with a non-zero offset) on the relevant fd.
Not sure where exactly pipewire's code does that, the syscall was observed
via stracing the relevant process.
More information about the dri-devel
mailing list