summaryrefslogtreecommitdiff
path: root/include/exec/memory.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-03-25 12:30:16 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-05-29 09:11:12 +0200
commit4ff87573df3606856a92c14eef3393a63d736d11 (patch)
tree17139888bbd5b87ad83af2fa2cbfc4f7de20ebac /include/exec/memory.h
parent063143d5b1fde0fdcbae30bc7d6d14e76fa607d2 (diff)
downloadqemu-4ff87573df3606856a92c14eef3393a63d736d11.zip
memory: remove qemu_get_ram_fd, qemu_set_ram_fd, qemu_ram_block_host_ptr
Remove direct uses of ram_addr_t and optimize memory_region_{get,set}_fd now that a MemoryRegion knows its RAMBlock directly. Reviewed-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/memory.h')
-rw-r--r--include/exec/memory.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index f649697ee9..16784941b5 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -667,6 +667,17 @@ static inline bool memory_region_is_rom(MemoryRegion *mr)
int memory_region_get_fd(MemoryRegion *mr);
/**
+ * memory_region_set_fd: Mark a RAM memory region as backed by a
+ * file descriptor.
+ *
+ * This function is typically used after memory_region_init_ram_ptr().
+ *
+ * @mr: the memory region being queried.
+ * @fd: the file descriptor that backs @mr.
+ */
+void memory_region_set_fd(MemoryRegion *mr, int fd);
+
+/**
* memory_region_get_ram_ptr: Get a pointer into a RAM memory region.
*
* Returns a host pointer to a RAM memory region (created with