qemu/docs/system/devices
Stefano Garzarella 4e647fa085 hostmem: add a new memory backend based on POSIX shm_open()
shm_open() creates and opens a new POSIX shared memory object.
A POSIX shared memory object allows creating memory backend with an
associated file descriptor that can be shared with external processes
(e.g. vhost-user).

The new `memory-backend-shm` can be used as an alternative when
`memory-backend-memfd` is not available (Linux only), since shm_open()
should be provided by any POSIX-compliant operating system.

This backend mimics memfd, allocating memory that is practically
anonymous. In theory shm_open() requires a name, but this is allocated
for a short time interval and shm_unlink() is called right after
shm_open(). After that, only fd is shared with external processes
(e.g., vhost-user) as if it were associated with anonymous memory.

In the future we may also allow the user to specify the name to be
passed to shm_open(), but for now we keep the backend simple, mimicking
anonymous memory such as memfd.

Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com> (QAPI schema)
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20240618100519.145853-1-sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-03 18:14:06 -04:00
..
can.rst docs: use "buses" rather than "busses" 2024-01-05 22:28:54 +03:00
canokey.rst docs: correct typos 2024-02-20 22:20:48 +03:00
ccid.rst docs/ccid: convert to restructuredText 2022-04-20 09:25:10 +02:00
cxl.rst docs/cxl: fix some typos 2024-06-30 19:51:44 +03:00
igb.rst docs/system/devices/igb: Note igb is tested for DPDK 2023-05-23 15:20:15 +08:00
ivshmem.rst docs/specs/ivshmem-spec: Convert to rST 2023-11-02 12:52:06 +00:00
keyboard.rst escc: emulate dip switch language layout settings on SUN keyboard 2023-06-28 10:54:25 +01:00
net.rst docs: Remove unused weirdly-named cross-reference targets 2023-05-12 15:43:38 +01:00
nvme.rst hw/nvme: Add NVMe NGUID property 2024-03-12 15:48:56 +01:00
usb-u2f.rst docs: Convert u2f.txt to rST 2023-05-18 11:40:32 +01:00
usb.rst docs/system/devices/usb: Replace the non-existing "qemu" binary 2024-06-30 19:51:44 +03:00
vhost-user-input.rst docs/system: Add vhost-user-input documentation 2024-02-14 06:09:32 -05:00
vhost-user-rng.rst docs/system: add a basic enumeration of vhost-user devices 2024-02-14 06:09:32 -05:00
vhost-user.rst hostmem: add a new memory backend based on POSIX shm_open() 2024-07-03 18:14:06 -04:00
virtio-gpu.rst docs/system: add basic virtio-gpu documentation 2023-10-16 11:29:56 +04:00
virtio-pmem.rst
virtio-snd.rst docs/system: add basic virtio-snd documentation 2023-11-07 03:39:10 -05:00