Skip to contentSkip to conversation

exec, Fix guest memory access.

PATCH Applied Anthony PERARD 2 participants 2 messages Mar 19, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exec, Fix guest memory access.

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.

---
 exec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
exec.c +2 -2
index be392e2..be08930 100644
@@ -3851,8 +3851,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);
             }
Signature · 1 line
tg: (30f51d7..) fix/memory_access (depends on: master)
Applied
#1 lore raw
Quoted 7 lines · Anthony PERARD

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.

Thanks, applied to memory/urgent, will push shortly.

Signature · 1 line
error compiling committee.c: too many arguments to function