memory: temporarily add memory_region_get_ram_addr()
This is a layering violation, but needed while the code contains
naked calls to qemu_get_ram_ptr() and the like.
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/memory.c b/memory.c
index 9e3f87a..6a637d4 100644
--- a/memory.c
+++ b/memory.c
@@ -1435,6 +1435,12 @@
memory_region_update_topology(mr);
}
+ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
+{
+ assert(mr->backend_registered);
+ return mr->ram_addr;
+}
+
static int cmp_flatrange_addr(const void *addr_, const void *fr_)
{
const AddrRange *addr = addr_;