From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsTNu-0001DH-Qa for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:18:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsTNo-0006L4-V7 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:18:38 -0500 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:46570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsTNo-0006Kr-Nv for qemu-devel@nongnu.org; Mon, 16 Dec 2013 03:18:32 -0500 Received: by mail-pa0-f41.google.com with SMTP id lf10so2635456pab.14 for ; Mon, 16 Dec 2013 00:18:31 -0800 (PST) From: edgar.iglesias@gmail.com Date: Mon, 16 Dec 2013 18:06:08 +1000 Message-Id: <1387181170-23267-21-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> References: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v1 20/22] exec: Make cpu_memory_rw_debug use the CPUs AS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 686f0d1..e672824 100644 --- a/exec.c +++ b/exec.c @@ -2669,6 +2669,7 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, int l; hwaddr phys_addr; target_ulong page; + CPUArchState *env = cpu->env_ptr; while (len > 0) { page = addr & TARGET_PAGE_MASK; @@ -2681,10 +2682,9 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, l = len; phys_addr += (addr & ~TARGET_PAGE_MASK); if (is_write) - cpu_physical_memory_write_rom(&address_space_memory, - phys_addr, buf, l); + cpu_physical_memory_write_rom(env->as, phys_addr, buf, l); else - cpu_physical_memory_rw(phys_addr, buf, l, is_write); + address_space_rw(env->as, phys_addr, buf, l, 0); len -= l; buf += l; addr += l; -- 1.7.10.4