提交 0a1b357f 编写于 作者: A Anthony PERARD 提交者: Avi Kivity

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: NAnthony PERARD <anthony.perard@citrix.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 32b08980
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册