aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-03-23 10:21:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-27 18:24:18 +0200
commit37d7c08413cd4307f53c83d43b1b06cf2701d7a7 (patch)
treefb4f93f730b5e8f8c3b0cca49f42090659327ab0 /include
parente95205e1f9cd2c4262b7a7b1c992a94512c86d0e (diff)
memory: add memory_region_ram_resize
This is a simple MemoryRegion wrapper for qemu_ram_resize. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/exec/memory.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 06ffa1d185..a2ea58776d 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -605,6 +605,18 @@ int memory_region_get_fd(MemoryRegion *mr);
*/
void *memory_region_get_ram_ptr(MemoryRegion *mr);
+/* memory_region_ram_resize: Resize a RAM region.
+ *
+ * Only legal before guest might have detected the memory size: e.g. on
+ * incoming migration, or right after reset.
+ *
+ * @mr: a memory region created with @memory_region_init_resizeable_ram.
+ * @newsize: the new size the region
+ * @errp: pointer to Error*, to store an error if it happens.
+ */
+void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize,
+ Error **errp);
+
/**
* memory_region_set_log: Turn dirty logging on or off for a region.
*