diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/memory.h | 10 | ||||
-rw-r--r-- | include/exec/ram_addr.h | 1 | ||||
-rw-r--r-- | include/sysemu/hostmem.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index 4c7bacf..1cf5981 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -534,6 +534,16 @@ bool memory_region_is_logging(MemoryRegion *mr); bool memory_region_is_rom(MemoryRegion *mr); /** + * memory_region_get_fd: Get a file descriptor backing a RAM memory region. + * + * Returns a file descriptor backing a file-based RAM memory region, + * or -1 if the region is not a file-based RAM memory region. + * + * @mr: the RAM or alias memory region being queried. + */ +int memory_region_get_fd(MemoryRegion *mr); + +/** * memory_region_get_ram_ptr: Get a pointer into a RAM memory region. * * Returns a host pointer to a RAM memory region (created with diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index deafceb..fcc7ef0 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -27,6 +27,7 @@ ram_addr_t qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr, ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, MemoryRegion *mr); ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr); +int qemu_get_ram_fd(ram_addr_t addr); void *qemu_get_ram_ptr(ram_addr_t addr); void qemu_ram_free(ram_addr_t addr); void qemu_ram_free_from_ptr(ram_addr_t addr); diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index ede5ec9..4cae673 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -53,6 +53,7 @@ struct HostMemoryBackend { /* protected */ uint64_t size; bool merge, dump; + bool prealloc, force_prealloc; MemoryRegion mr; }; |