diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2022-10-13 14:59:05 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2022-10-26 14:56:42 -0400 |
commit | 6d998f3cbfebabea7882848a65c38f454d2a37c4 (patch) | |
tree | a53270b8b78ddd1fa5b341a323f0e629206303d8 /include/exec | |
parent | 7f9241d805b4711a4f7dc5489df0e7e30b8c1496 (diff) | |
download | qemu-6d998f3cbfebabea7882848a65c38f454d2a37c4.zip qemu-6d998f3cbfebabea7882848a65c38f454d2a37c4.tar.gz qemu-6d998f3cbfebabea7882848a65c38f454d2a37c4.tar.bz2 |
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>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/cpu-common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index c493510..6feaa40 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -92,6 +92,7 @@ void qemu_ram_set_uf_zeroable(RAMBlock *rb); bool qemu_ram_is_migratable(RAMBlock *rb); void qemu_ram_set_migratable(RAMBlock *rb); void qemu_ram_unset_migratable(RAMBlock *rb); +int qemu_ram_get_fd(RAMBlock *rb); size_t qemu_ram_pagesize(RAMBlock *block); size_t qemu_ram_pagesize_largest(void); |