aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/memory.c b/memory.c
index f8085eab87..8ba496dc7b 100644
--- a/memory.c
+++ b/memory.c
@@ -1657,10 +1657,10 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr)
mr = mr->alias;
}
assert(mr->ram_block);
- ptr = qemu_get_ram_ptr(mr->ram_block, memory_region_get_ram_addr(mr));
+ ptr = qemu_map_ram_ptr(mr->ram_block, offset);
rcu_read_unlock();
- return ptr + offset;
+ return ptr;
}
MemoryRegion *memory_region_from_host(void *ptr, ram_addr_t *offset)