From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsXau-0002ns-SJ for qemu-devel@nongnu.org; Mon, 16 Dec 2013 07:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsXao-0001tE-J8 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 07:48:20 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38285 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsXao-0001t2-CU for qemu-devel@nongnu.org; Mon, 16 Dec 2013 07:48:14 -0500 Message-ID: <52AEF68A.4000703@suse.de> Date: Mon, 16 Dec 2013 13:48:10 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1387181170-23267-1-git-send-email-edgar.iglesias@gmail.com> <1387181170-23267-21-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1387181170-23267-21-git-send-email-edgar.iglesias@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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: edgar.iglesias@gmail.com, qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, aurelien@aurel32.net, rth@twiddle.net Am 16.12.2013 09:06, schrieb edgar.iglesias@gmail.com: > From: "Edgar E. Iglesias" >=20 > Signed-off-by: Edgar E. Iglesias > --- > exec.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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_ulo= ng addr, > int l; > hwaddr phys_addr; > target_ulong page; > + CPUArchState *env =3D cpu->env_ptr; > =20 > while (len > 0) { > page =3D addr & TARGET_PAGE_MASK; > @@ -2681,10 +2682,9 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ul= ong addr, > l =3D len; > phys_addr +=3D (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? :) Andreas > len -=3D l; > buf +=3D l; > addr +=3D l; --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg