From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsiuU-00037D-2t for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:53:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsiuL-0004R4-OI for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:53:18 -0500 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]:36723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsiuL-0004QZ-Fv for qemu-devel@nongnu.org; Mon, 16 Dec 2013 19:53:09 -0500 Received: by mail-pd0-f170.google.com with SMTP id g10so6069846pdj.29 for ; Mon, 16 Dec 2013 16:53:08 -0800 (PST) Date: Tue, 17 Dec 2013 10:52:35 +1000 From: "Edgar E. Iglesias" Message-ID: <20131217005235.GF2161@edvb> References: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> <1387181170-23267-21-git-send-email-edgar.iglesias@gmail.com> <52AEF68A.4000703@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52AEF68A.4000703@suse.de> Subject: Re: [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: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, aurelien@aurel32.net, rth@twiddle.net On Mon, Dec 16, 2013 at 01:48:10PM +0100, Andreas Färber wrote: > Am 16.12.2013 09:06, schrieb edgar.iglesias@gmail.com: > > 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); > > Add braces for if and else while at it? :) Fixed, thanks.