From: Val Packett <val@invisiblethingslab.com>
To: virtio-comment@lists.linux.dev
Cc: "Val Packett" <val@invisiblethingslab.com>,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Sergio Lopez" <slp@redhat.com>,
"Parav Pandit" <parav@nvidia.com>,
dmitry.osipenko@collabora.com, mst@redhat.com,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Alyssa Ross" <hi@alyssa.is>,
"Demi Marie Obenour" <demiobenour@gmail.com>
Subject: [PATCH v3 0/3] virtio-gpu: add F_BLOB_GUEST_SHAREABLE (ex CREATE_GUEST_HANDLE) and F_BLOB_CTX_ID_FIX
Date: Tue, 24 Nov 2026 18:19:26 -0300 [thread overview]
Message-ID: <20261124211931.809982-1-val@invisiblethingslab.com> (raw)
Hi,
I've been working on actually implementing the "lost" CREATE_GUEST_HANDLE
feature which allows guest-only blobs to be shareable, particularly enabling
PRIME-imported (from udmabuf or passthru dGPUs) buffers to be shared with
the host Wayland compositor when using the cross-domain context type.
This version renames the feature from F_CREATE_GUEST_HANDLE (which was too
host/implementation-centric really) to F_BLOB_GUEST_SHAREABLE, and removes
the new blob creation flag in favor of reusing the existing one,
VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE. While here, I documented all three
existing flags properly, including which kinds of resources they work with.
It seems correct to me to reuse the SHAREABLE flag because the semantics are
the same. Sharing between virtio-gpu contexts *is* what the guest relies on
to instruct the host to effectively share across host processes!
The flag has *not* been used with guest-only blobs when 3d contexts are
present before. The Linux driver did set the SHAREABLE flag in PRIME import
code, but PRIME import was restricted to devices that did *NOT* support
3d contexts at all. In Mesa, the use of SHAREABLE corresponds to "being able
to DMA-BUF export" (non-empty VkExternalMemoryHandleTypeFlags for Venus,
!RADEON_FLAG_NO_INTERPROCESS_SHARING for amdgpu). These are all exactly
the semantics that match the cross-process/dma-buf kind of shareability
on the host side.
Also addressed feedback: now BLOB_GUEST_SHAREABLE depends on BLOB_CTX_ID_FIX
(therefore BLOB_CTX_ID_FIX is introduced first); s/rendering context/context/.
Hopefully third time's the charm :)
v2: https://lore.kernel.org/all/20260903021442.423274-1-val@invisiblethingslab.com/
v1 has been lost to the moderation queue.
Thanks,
~val
---
Val Packett (3):
virtio-gpu: document individual blob_flags
virtio-gpu: introduce BLOB_CTX_ID_FIX feature
virtio-gpu: introduce BLOB_GUEST_SHAREABLE feature
device-types/gpu/description.tex | 34 +++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
--
2.56.0
next reply other threads:[~2026-11-24 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 21:19 Val Packett [this message]
2026-11-24 21:19 ` [PATCH v3 1/3] virtio-gpu: document individual blob_flags Val Packett
2026-11-24 21:19 ` [PATCH v3 2/3] virtio-gpu: introduce BLOB_CTX_ID_FIX feature Val Packett
2026-11-24 21:19 ` [PATCH v3 3/3] virtio-gpu: introduce BLOB_GUEST_SHAREABLE feature Val Packett
2026-11-24 22:44 ` [PATCH v3 0/3] virtio-gpu: add F_BLOB_GUEST_SHAREABLE (ex CREATE_GUEST_HANDLE) and F_BLOB_CTX_ID_FIX Demi Marie Obenour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124211931.809982-1-val@invisiblethingslab.com \
--to=val@invisiblethingslab.com \
--cc=demiobenour@gmail.com \
--cc=dmitry.osipenko@collabora.com \
--cc=gurchetansingh@chromium.org \
--cc=hi@alyssa.is \
--cc=marmarek@invisiblethingslab.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=slp@redhat.com \
--cc=virtio-comment@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox