From 37d7c08413cd4307f53c83d43b1b06cf2701d7a7 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 23 Mar 2015 10:21:46 +0100 Subject: memory: add memory_region_ram_resize This is a simple MemoryRegion wrapper for qemu_ram_resize. Signed-off-by: Paolo Bonzini --- memory.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'memory.c') diff --git a/memory.c b/memory.c index ee3f2a8a95..a11e9bf08a 100644 --- a/memory.c +++ b/memory.c @@ -1452,6 +1452,13 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr) return qemu_get_ram_ptr(mr->ram_addr & TARGET_PAGE_MASK); } +void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp) +{ + assert(mr->terminates); + + qemu_ram_resize(mr->ram_addr, newsize, errp); +} + static void memory_region_update_coalesced_range_as(MemoryRegion *mr, AddressSpace *as) { FlatView *view; -- cgit 1.4.1