mirror of https://github.com/xqemu/xqemu.git
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>
This commit is contained in:
parent
950c671df1
commit
021d26d161
2
memory.c
2
memory.c
|
@ -1063,7 +1063,7 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr)
|
||||||
|
|
||||||
assert(mr->terminates);
|
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)
|
static void memory_region_update_coalesced_range(MemoryRegion *mr)
|
||||||
|
|
Loading…
Reference in New Issue