physmem: qemu_ram_alloc_from_fd extensions
authorSteve Sistare <steven.sistare@oracle.com>
Wed, 15 Jan 2025 19:00:29 +0000 (11:00 -0800)
committerFabiano Rosas <farosas@suse.de>
Wed, 29 Jan 2025 14:43:03 +0000 (11:43 -0300)
commit3ec02148160a8147187fce211d1251af2c4cf9f1
tree1ead44b267a1b84782097c9d38baf2eb8e1e60d0
parent719168fba7c3215cc996dcfd32a6e5e9c7b8eee0
physmem: qemu_ram_alloc_from_fd extensions

Extend qemu_ram_alloc_from_fd to support resizable ram, and define
qemu_ram_resize_cb to clean up the API.

Add a grow parameter to extend the file if necessary.  However, if
grow is false, a zero-sized file is always extended.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/r/1736967650-129648-4-git-send-email-steven.sistare@oracle.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
include/exec/ram_addr.h
system/memory.c
system/physmem.c