From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcD2-0001MW-Tc for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcD1-0003t3-PA for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:32 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:38742) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcD1-0003sW-JM for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:31 -0400 Received: by mail-wm0-x242.google.com with SMTP id m129-v6so39171334wmb.3 for ; Tue, 29 May 2018 03:50:31 -0700 (PDT) From: "Edgar E. Iglesias" Date: Tue, 29 May 2018 12:49:43 +0200 Message-Id: <20180529105011.1914-11-edgar.iglesias@gmail.com> In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PULL v1 10/38] target-microblaze: Bypass MMU with MMU_NOMMU_IDX List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, edgar.iglesias@xilinx.com From: "Edgar E. Iglesias" Bypass MMU translation when mmu-index MMU_NOMMU_IDX is used. Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index a9f4ca93e3..261dcc74c7 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -58,7 +58,8 @@ int mb_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw, int prot; /* Translate if the MMU is available and enabled. */ - if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM)) { + if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM) + && mmu_idx != MMU_NOMMU_IDX) { uint32_t vaddr, paddr; struct microblaze_mmu_lookup lu; -- 2.14.1