aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-12-19 12:06:23 +0200
committerAvi Kivity <avi@redhat.com>2011-12-20 14:14:08 +0200
commite34911c420c617151fe5bc95a4b6f269cca0483b (patch)
tree49b7cd0df473386a53bf4fef2534c48134dd2e72 /memory.c
parentc65adf9bcdc9c3212d62696f1b52c8ce0f98dd7f (diff)
downloadqemu-e34911c420c617151fe5bc95a4b6f269cca0483b.zip
qemu-e34911c420c617151fe5bc95a4b6f269cca0483b.tar.gz
qemu-e34911c420c617151fe5bc95a4b6f269cca0483b.tar.bz2
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>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 9e3f87a..6a637d4 100644
--- a/memory.c
+++ b/memory.c
@@ -1435,6 +1435,12 @@ void memory_region_set_alias_offset(MemoryRegion *mr, target_phys_addr_t offset)
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_;