Re: [PATCH] Add VIRTIO_F_DMB (Device Memory Buffer)

Stefan Hajnoczi <[email protected]> Thu, 16 Jul 2026 10:50:25 +0100
Newsgroups dev.linux.lists.virtio-comment
Message-ID <20260716095025.GB741667@fedora>
--A4x0pOVuHM9U7Afj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jul 02, 2026 at 04:00:06AM +0000, Alexander Graf wrote:
> * Shared memory region id: DMB needs a well-known shmid so the driver can
>   locate the region independent of device type. This draft reserves shmid 2
>   and adds a "Reserved Shared Memory Region IDs" registry. However shmid is
>   currently a per-device-type namespace, and at least one device type
>   (virtio-scmi) documents the entire shmid space as its own. Guidance
>   requested on the preferred mechanism: (a) a small transport-reserved shmid
>   range with device types adjusted to exclude it, or (b) identifying the DMB
>   region by a means other than a fixed shmid. The exact number is not fixed
>   pending this decision.

Hi Alex,
VIRTIO Transports could provide a way to fetch the DMB shmid. For
example, the MMIO transport would get a new read-only DMBSHMId register
that contains a valid shmid when VIRTIO_F_DMB has been negotiated.

Allowing the device to report an arbitrary shmid is flexible - it won't
interfere with device-specific Shared Memory Regions or future
Transport-specific Shared Memory Regions.

Stefan

--A4x0pOVuHM9U7Afj
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmpYqWEACgkQnKSrs4Gr
c8jzlQf/VTHMCLTDFVqIGTHUNkNZ4Ew7cUqgoi3TcpDwDhSy3+rWKwHyjtpQjwsy
UTzwPw9waO6jWhdEQCQS1Dtd2IAVeiO3Of7WbLgiawnqyxXjbkp2JAzrHAezwenM
2IzyacXLPZbZl48YIFil0rldMF8Ks3YR5ESC/EnMBnHrYu+5JLylt3g69rgK1m3u
l2/JFGOfCPx7Qr3lVx3V6ReRJaYO8zYAINfGHkUgtcGUck5kfVWN5mcEZKRKONja
Kz46Dz67vGb24kNjlLXddxobxcOxTQclT3bXn1OxCzDZfQi0VThZfjWM6ggPziUO
f4k5zrI13HDsGyk5jtEyXNLDgfOh3w==
=Fvjk
-----END PGP SIGNATURE-----

--A4x0pOVuHM9U7Afj--