From patchwork Mon Jan 13 07:39:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 309712 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 43CCC2C0097 for ; Mon, 13 Jan 2014 18:41:53 +1100 (EST) Received: from localhost ([::1]:40907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2c9f-0004GP-4K for incoming@patchwork.ozlabs.org; Mon, 13 Jan 2014 02:41:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2c9C-000453-1A for qemu-devel@nongnu.org; Mon, 13 Jan 2014 02:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2c93-0004FN-V5 for qemu-devel@nongnu.org; Mon, 13 Jan 2014 02:41:21 -0500 Received: from mail-qe0-x229.google.com ([2607:f8b0:400d:c02::229]:37281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2c93-0004Ew-Lu for qemu-devel@nongnu.org; Mon, 13 Jan 2014 02:41:13 -0500 Received: by mail-qe0-f41.google.com with SMTP id gh4so6834261qeb.28 for ; Sun, 12 Jan 2014 23:41:13 -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=odUc3P+hgY4rkcTnhqThd5u74+TFMZzZZr7pduW/q7Y=; b=qSyiYHpz7ial45P+Vy4FWha9UWUo/ouugIk9UsJ/MY2Tv+C6rDabgtPb7y5t5R4hnp F/OTSX9QVnwBZqRVoMGV7p659+SaOzIGIQn5+zFKIKDWfSFyQjyUKNU6ADuiIKxHqD4i s2cLtDl15DJtCSu2T38yS40BOmlpSg3bj3YAvks8V4bPLcMO9TdNRLuByszOt4+bBZuH ueuXI3XPN0UVnSCzQKdgGCKAPwp6Ju3/M0MkXgQYE6RZ+Mb7whlHSBefQBMGRHKUAZfI fT8I1ClInEVhEeMamy6LGAo+CEHnvo4kKfSwSUpxbJPzKNxL3nGyPMqHlWowUMxlGXI9 iABA== X-Received: by 10.224.128.72 with SMTP id j8mr36788815qas.51.1389598873261; Sun, 12 Jan 2014 23:41:13 -0800 (PST) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id d16sm24299480qaw.1.2014.01.12.23.41.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 12 Jan 2014 23:41:12 -0800 (PST) From: edgar.iglesias@gmail.com To: qemu-devel@nongnu.org Date: Mon, 13 Jan 2014 17:39:41 +1000 Message-Id: <1389598802-14977-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389598802-14977-1-git-send-email-edgar.iglesias@gmail.com> References: <1389598802-14977-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:400d:c02::229 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 v3 01/22] exec: Make tb_invalidate_phys_addr input an 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" No functional change. Signed-off-by: Edgar E. Iglesias --- exec.c | 3 ++- include/exec/exec-all.h | 2 +- target-xtensa/op_helper.c | 3 ++- translate-all.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/exec.c b/exec.c index 7e49e8e..98ca024 100644 --- a/exec.c +++ b/exec.c @@ -485,7 +485,8 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) { hwaddr phys = cpu_get_phys_page_debug(cpu, pc); if (phys != -1) { - tb_invalidate_phys_addr(phys | (pc & ~TARGET_PAGE_MASK)); + tb_invalidate_phys_addr(&address_space_memory, + phys | (pc & ~TARGET_PAGE_MASK)); } } #endif diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index ea90b64..b4dfc07 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -101,7 +101,7 @@ void tlb_flush(CPUArchState *env, int flush_global); void tlb_set_page(CPUArchState *env, target_ulong vaddr, hwaddr paddr, int prot, int mmu_idx, target_ulong size); -void tb_invalidate_phys_addr(hwaddr addr); +void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr); #else static inline void tlb_flush_page(CPUArchState *env, target_ulong addr) { diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index cf97025..89a72b5 100644 --- a/target-xtensa/op_helper.c +++ b/target-xtensa/op_helper.c @@ -29,6 +29,7 @@ #include "helper.h" #include "qemu/host-utils.h" #include "exec/softmmu_exec.h" +#include "exec/address-spaces.h" static void do_unaligned_access(CPUXtensaState *env, target_ulong addr, int is_write, int is_user, uintptr_t retaddr); @@ -90,7 +91,7 @@ static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr) int ret = xtensa_get_physical_addr(env, false, vaddr, 2, 0, &paddr, &page_size, &access); if (ret == 0) { - tb_invalidate_phys_addr(paddr); + tb_invalidate_phys_addr(&address_space_memory, paddr); } } diff --git a/translate-all.c b/translate-all.c index 105c25a..3cbe0d4 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1355,13 +1355,13 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) } #if defined(TARGET_HAS_ICE) && !defined(CONFIG_USER_ONLY) -void tb_invalidate_phys_addr(hwaddr addr) +void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr) { ram_addr_t ram_addr; MemoryRegion *mr; hwaddr l = 1; - mr = address_space_translate(&address_space_memory, addr, &addr, &l, false); + mr = address_space_translate(as, addr, &addr, &l, false); if (!(memory_region_is_ram(mr) || memory_region_is_romd(mr))) { return;