exec/cpu-common: add qemu_ram_get_fd()
commit6d998f3cbfebabea7882848a65c38f454d2a37c4
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Oct 2022 18:59:05 +0000 (13 14:59 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 26 Oct 2022 18:56:42 +0000 (26 14:56 -0400)
treea53270b8b78ddd1fa5b341a323f0e629206303d8
parent7f9241d805b4711a4f7dc5489df0e7e30b8c1496
exec/cpu-common: add qemu_ram_get_fd()

Add a function to get the file descriptor for a RAMBlock. Device
emulation code typically uses the MemoryRegion APIs but vhost-style code
may use RAMBlock directly for sharing guest memory with another process.

This new API will be used by the libblkio block driver so it can share
guest memory via .bdrv_register_buf().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20221013185908.1297568-11-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/exec/cpu-common.h
softmmu/physmem.c