From patchwork Wed May 16 18:51:18 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: 10404695 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 24084601C8 for ; Wed, 16 May 2018 19:01:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12518286CF for ; Wed, 16 May 2018 19:01:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01E85286D4; Wed, 16 May 2018 19:01:44 +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=-4.0 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 41D1B286D3 for ; Wed, 16 May 2018 19:01:44 +0000 (UTC) Received: from localhost ([::1]:34228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1gF-0002qR-9Q for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 May 2018 15:01:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJ1Wx-00034p-Hk for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJ1Ww-0000k8-Oq for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:07 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:52551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJ1Wv-0000js-Jz for qemu-devel@nongnu.org; Wed, 16 May 2018 14:52:06 -0400 Received: by mail-wm0-x242.google.com with SMTP id w194-v6so3861070wmf.2 for ; Wed, 16 May 2018 11:52:05 -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=O3xSz7M3JPxQKZbY25E80LGLmiDlvztFSGR/Zs1N0HzudAJeeySJlPZ77xWMzlPdcC uIqPt0fqMTxEqoMJXsrXAxFgoPQ35y6uW1EOcMVIMkAF/ZeX1m5xHMkcp3QL35qf6gOX a2Hit+SBOU3Na3U7S5VJr17lUtLgDR9M9g1ffr328JQUpFpqiwWLL0KoTW/SCCaS8jYV lSocQBlpEhY7QzS0P08aI8PKgOmWVxV+ltn8QK8v96CqcIJQhl5YlBHU6HoD0rI7wE4K HMGLOmf/Xkz8ayv6O+yTwZ2INobgiiyWgNX/EOg7wJlkjPDZJy81QG7fQmXdBnKUfwvL pJIg== 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=HaPbNijJmxBupeRoAivezAPuomiJ/p4jcq/ejwfsR0JWhxB3OX9SKDZDhaoBhXIqYQ lopI+paIqtsvPpVOgDejGJBmeW7oAmvSi8eJXYd2qiWVwJZQr3qslcO7LNvcEhxStTnu NyzAaN2u8u79DbTC1V9+u26tX2vArQP0YnOMFi+Mf0/Uqrz7gCCfqSQ4Z6jq8+CK7NnV bTtxZHwYSE0BrefCYq4tKwFzEF33+KUPl4YQSgDw8m7LKUN4NAwUleopW2Ns0DeAgDok maU0aGJkGKnoNBiYtaoQqvwFCVPwZvAtRYVsr8Qcfmozo6wBT7/i1G0tY5tGQfdEEzYX NS/g== X-Gm-Message-State: ALKqPwcR5x1Jq7FJozMe6vy3rO4h3UnuYs2zEZw1QOYCdaoWR/8eL06H Kz8+1kflqm4OqdbCGVjSygKE8Q== X-Google-Smtp-Source: AB8JxZpESbuFudLopopIdJcDHG9m7Z4qyOOXLDcGVj4mrWyStWBVGwUeM0v3d6bR3W4R8cItLXvc5A== X-Received: by 2002:a2e:404d:: with SMTP id n74-v6mr1316645lja.6.1526496724092; Wed, 16 May 2018 11:52:04 -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 o11-v6sm515884lfi.14.2018.05.16.11.52.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 11:52:03 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 20:51:18 +0200 Message-Id: <20180516185146.30708-11-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180516185146.30708-1-edgar.iglesias@gmail.com> References: <20180516185146.30708-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] [PATCH v3 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, sstabellini@kernel.org, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com 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;