[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another |
Date: |
Mon, 02 Jan 2012 18:49:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Am 01.01.2012 18:23, schrieb Avi Kivity:
> 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 <address@hidden>
Line numbers don't match master ;) but applies cleanly and looks good.
Acked-by: Andreas Färber <address@hidden>
Andreas
> exec.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 8a3f621..c366835 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;
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg