From patchwork Tue May 29 10:49:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10434929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 69CED602BF for ; Tue, 29 May 2018 10:54:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A757286BA for ; Tue, 29 May 2018 10:54:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F0B3286C1; Tue, 29 May 2018 10:54:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E53C8286BA for ; Tue, 29 May 2018 10:54:44 +0000 (UTC) Received: from localhost ([::1]:60102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcH6-0004nK-4i for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 06:54:44 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XcaBif2G1gHZNdGnfBcVzRnLzbEc47vn/TGeNHdxtBc=; b=rBUO9FuvKZ94l/8aMf2r46YfANIFxX0V5EBFJ+2QZ3F+7mhXCkRuQzr65QrzQoHfY9 dfownwHn0rzRrYjID2hYy6Gyu3beVXiuX/CdipPQprA7J6Ys5P6m+GtmgrYx6DAYiXCD WE6onTaipGjNWd28Sjvzpod34cVXEm2HXSgbVzOytJlY1doyhRnj5VnHeXbcRi7LrYbw 165tB8S11ZJUWIFtS5sbfv6MpAo2DJACpv1tafNx17C8q7RzuL1ZxPuLnO+Z7RP30cLY BMzlfouYYxytdlasXEwRrn3CUbN3dF8JCtqMD39C2i/dVlsWBTr1RXPXfGC2owI84+tI Sc/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XcaBif2G1gHZNdGnfBcVzRnLzbEc47vn/TGeNHdxtBc=; b=X8geXmR6m7a8xBehhSmVhQmK+uatrY4fAV6kjamj0WfNRnhpIzBk4QdnMDvRLsOBOE ouzdHQYoXwUHxBP2Y4BJkE8sb2gvJE9erHgucgHAC0wVTnFTY/VvQ9vKzQKQTCyyAseF KvfoYtNeMvHdNfVWphC6vkj8UZiItp93M2+Id1nMYfBB2J5Beb/CiLJQXD0pReAGEQpg zNU2Ds+SK8RzkbHdip18OOmQy73pU+/Rt8Okl8r0KblL+gN62eD8QvFBl8PxIJZR3A8Z eOPh7qASElf4KPECug0RRfoSVZi8G36iRmdytuVmXvsbE6WFo968JxnnrEcpBTENnVH2 7SLA== X-Gm-Message-State: ALKqPweaH4rbxDIXwu0lzAz0gT32WqV4jk4AHKiDUcjPe4/H/DPpNmo8 46EuCUAvC0d7FNyMvwUccBD99g== X-Google-Smtp-Source: AB8JxZoY+WS9EtTM4gxj3JU3IyEnkKPGLU5EXyxptg+YAWprYj6+KQI/FLBoKxI67gQF/oo7zwphHA== X-Received: by 2002:a2e:87d8:: with SMTP id v24-v6mr10714324ljj.69.1527591030311; Tue, 29 May 2018 03:50:30 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id u2-v6sm6408310lji.4.2018.05.29.03.50.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:29 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:43 +0200 Message-Id: <20180529105011.1914-11-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL v1 10/38] target-microblaze: Bypass MMU with MMU_NOMMU_IDX X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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;