[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMT+MTSCKiRMy6r2uDsT0dpv=jru-G-M5qih6vPSe=ZvpKC-kw@mail.gmail.com>
Date: Sun, 19 Jan 2025 21:42:17 +0100
From: Sasha Finkelstein <fnkl.kernel@...il.com>
To: Dmitry Osipenko <dmitry.osipenko@...labora.com>
Cc: David Airlie <airlied@...hat.com>, Gerd Hoffmann <kraxel@...hat.com>,
Gurchetan Singh <gurchetansingh@...omium.org>, Chia-I Wu <olvaffe@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, Simona Vetter <simona@...ll.ch>, dri-devel@...ts.freedesktop.org,
virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
asahi@...ts.linux.dev
Subject: Re: [PATCH] drm/virtio: Support partial maps of GEM objects
On Sun, 19 Jan 2025 at 21:02, Dmitry Osipenko
<dmitry.osipenko@...labora.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.
Powered by blists - more mailing lists