From 2774c6d0ae20d32d75f77e7ed063ddbb854ca4c5 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 1 Jan 2012 18:24:24 +0200 Subject: Fix wrong region_offset when overlaying a page with another MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Andreas Färber Reviewed-by: Richard Henderson --- exec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 8a3f6213a..c36683508 100644 --- a/exec.c +++ b/exec.c @@ -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; -- cgit v1.2.3