summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2012-03-19 15:54:34 +0000
committerAvi Kivity <avi@redhat.com>2012-03-19 19:13:30 +0200
commit0a1b357f1555ce410d2d0d5f947b5415587ac4d8 (patch)
treed3768268e966fe06454a350e15c3f9507c5bbfa1 /exec.c
parent32b089808f125470b3563bf4209c2301fa35c58e (diff)
downloadqemu-0a1b357f1555ce410d2d0d5f947b5415587ac4d8.tar.gz
exec: fix guest memory access for Xen
In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is no longuer called with the ram addr we want to access, but only with the section address. This patch fixes this. (All other call to qemu_get_ram_ptr are already called with the right address.) This patch fixes Xen guest. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index a3818ffeb7..265e895603 100644
--- a/exec.c
+++ b/exec.c
@@ -3856,8 +3856,8 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
}
} else {
/* RAM case */
- ptr = qemu_get_ram_ptr(section->mr->ram_addr)
- + section_addr(section, addr);
+ ptr = qemu_get_ram_ptr(section->mr->ram_addr
+ + section_addr(section, addr));
memcpy(buf, ptr, l);
qemu_put_ram_ptr(ptr);
}