* [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another
@ 2012-01-01 17:23 Avi Kivity
2012-01-02 17:49 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2012-01-01 17:23 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel
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>
---
Once qemu-test is merged, remind me to post a testlet for this.
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;
--
1.7.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another
2012-01-01 17:23 [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another Avi Kivity
@ 2012-01-02 17:49 ` Andreas Färber
2012-01-03 10:04 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2012-01-02 17:49 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel
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 <avi@redhat.com>
Line numbers don't match master ;) but applies cleanly and looks good.
Acked-by: Andreas Färber <afaerber@suse.de>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another
2012-01-02 17:49 ` Andreas Färber
@ 2012-01-03 10:04 ` Avi Kivity
0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2012-01-03 10:04 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel
On 01/02/2012 07:49 PM, Andreas Färber wrote:
> 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 <avi@redhat.com>
>
> Line numbers don't match master ;) but applies cleanly and looks good.
>
It's part of my MemoryRegion dispatch patchset. It may be applied
separately or as part of that patchset, but since it's a bugfix I
thought I'd highlight it.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-03 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-01 17:23 [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another Avi Kivity
2012-01-02 17:49 ` Andreas Färber
2012-01-03 10:04 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).