From patchwork Thu Dec 19 05:51:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 303190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BF2842C00BC for ; Thu, 19 Dec 2013 17:04:02 +1100 (EST) Received: from localhost ([::1]:42265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtWiF-00068Y-RU for incoming@patchwork.ozlabs.org; Thu, 19 Dec 2013 01:03:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtWgZ-0004GT-Ar for qemu-devel@nongnu.org; Thu, 19 Dec 2013 01:02:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtWgT-0001cJ-ER for qemu-devel@nongnu.org; Thu, 19 Dec 2013 01:02:15 -0500 Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:51464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtWgT-0001cD-88 for qemu-devel@nongnu.org; Thu, 19 Dec 2013 01:02:09 -0500 Received: by mail-pb0-f51.google.com with SMTP id up15so693925pbc.24 for ; Wed, 18 Dec 2013 22:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/CVJfe5BqRpu4W6jGZgGB6U7xs/xjlX1vQhfejnUoO4=; b=oxmE4fSTImgCzefw9z7fwKM6dsLsJuuKS4pBDiWbBGjr5XCoPB1mlQ+m3F2LgXgkhd TGK5dXMI1TPRJLDJQ74jo4lJwQXELjS2T9TlfMbq4B3+Ep1aRNfErD4k7rTsp6ktZia/ NCzklSfqw8RKFa5P3Lwq61wPR1pSlso9is+loLqsheOchte6UI4nQdoSIIl7Ag2aH0r1 IqZ0HXqu4LYElC2rfBuqgjQuE2UHGxBhaiNVsJbKuSy6V8sfkzgSkYrPSs04SPrmygD6 V1vji8nqLTMRghFOibjWNbsiPeLqN6G7tsUhrzNn02spOk+XgohvQdm26xo9bH/YPnGA EfrA== X-Received: by 10.66.154.75 with SMTP id vm11mr22436095pab.124.1387432928378; Wed, 18 Dec 2013 22:02:08 -0800 (PST) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id lh13sm5887547pab.4.2013.12.18.22.02.06 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 22:02:07 -0800 (PST) From: edgar.iglesias@gmail.com To: qemu-devel@nongnu.org Date: Thu, 19 Dec 2013 15:51:28 +1000 Message-Id: <1387432293-17711-18-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1387432293-17711-1-git-send-email-edgar.iglesias@gmail.com> References: <1387432293-17711-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::233 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 Subject: [Qemu-devel] [PATCH v2 17/22] exec: Make cpu_memory_rw_debug use the CPUs AS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- exec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exec.c b/exec.c index f606376..2872b86 100644 --- a/exec.c +++ b/exec.c @@ -2677,11 +2677,11 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, if (l > len) l = len; phys_addr += (addr & ~TARGET_PAGE_MASK); - if (is_write) - cpu_physical_memory_write_rom(&address_space_memory, - phys_addr, buf, l); - else - cpu_physical_memory_rw(phys_addr, buf, l, is_write); + if (is_write) { + cpu_physical_memory_write_rom(cpu->as, phys_addr, buf, l); + } else { + address_space_rw(cpu->as, phys_addr, buf, l, 0); + } len -= l; buf += l; addr += l;