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 | 5a3b4a21d9a02828fdca9ecfdda57716b6896ab7 (patch) | |
tree | 6bfb839c497fe2add3d246bffc8b078114f5e552 | |
parent | 615b32541696d3e8518bbe6f243dd2bf94c7d5f2 (diff) | |
download | qemu-5a3b4a21d9a02828fdca9ecfdda57716b6896ab7.tar.gz qemu-5a3b4a21d9a02828fdca9ecfdda57716b6896ab7.tar.bz2 qemu-5a3b4a21d9a02828fdca9ecfdda57716b6896ab7.zip |
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) |