diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-30 00:38:24 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-08-30 11:20:18 +0300 |
commit | 021d26d161bac89235eb79126996825221cf9f10 (patch) | |
tree | 6bfb839c497fe2add3d246bffc8b078114f5e552 | |
parent | 950c671df1078f4505d1b8461620f48aa91a9fda (diff) |
memory: Fix memory_region_get_ram_ptr for ROM devices
Mask out the sub-page bits that are used by ROM device for storing the
io-index and the IO_MEM_ROMD flag.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1063,7 +1063,7 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr) assert(mr->terminates); - return qemu_get_ram_ptr(mr->ram_addr); + return qemu_get_ram_ptr(mr->ram_addr & TARGET_PAGE_MASK); } static void memory_region_update_coalesced_range(MemoryRegion *mr) |