diff options
author | Avi Kivity <avi@redhat.com> | 2012-01-01 18:24:24 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-01-04 13:34:49 +0200 |
commit | 2774c6d0ae20d32d75f77e7ed063ddbb854ca4c5 (patch) | |
tree | 1c27a99dec9f809af6530c3014c81b3c057e9caf | |
parent | 26a83ad0e793465b74a8b06a65f2f6fdc5615413 (diff) | |
download | qemu-2774c6d0ae20d32d75f77e7ed063ddbb854ca4c5.zip |
Fix wrong region_offset when overlaying a page with another
cpu_register_physical_memory_log() does not update region_offset
if a page was previously registered for the same address. This
could cause mmio accesses going to the wrong place, by using the
old region_offset.
Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | exec.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2542,6 +2542,7 @@ void cpu_register_physical_memory_log(target_phys_addr_t start_addr, p->region_offset = 0; } else { p->phys_offset = phys_offset; + p->region_offset = region_offset; if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM || (phys_offset & IO_MEM_ROMD)) phys_offset += TARGET_PAGE_SIZE; |