Received: from eggs.gnu.org ([2001:4830:134:3::10]:43917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCC-0005r7-Ve for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqHCB-0007TH-8d for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:04 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCB-0007T3-1m for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:03 -0400 Received: by mail-wm0-x242.google.com with SMTP id b184so6753949wma.3 for ; Sat, 01 Oct 2016 03:07:02 -0700 (PDT) From: Artyom Tarasenko Date: Sat, 1 Oct 2016 12:05:05 +0200 Message-Id: <1475316333-9776-2-git-send-email-atar4qemu@gmail.com> In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> Subject: [Qemu-devel] [PATCH 01/29] target-sparc: don't trap on MMU-fault if MMU is disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Richard Henderson , Mark Cave-Ayland , Artyom Tarasenko Signed-off-by: Artyom Tarasenko --- target-sparc/ldst_helper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 6ce5ccc..f17ac9b 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -2341,9 +2341,13 @@ void sparc_cpu_unassigned_access(CPUState *cs, hwaddr addr, #endif if (is_exec) { - helper_raise_exception(env, TT_CODE_ACCESS); + if (env->lsu & (IMMU_E)) { + helper_raise_exception(env, TT_CODE_ACCESS); + } } else { - helper_raise_exception(env, TT_DATA_ACCESS); + if (env->lsu & (DMMU_E)) { + helper_raise_exception(env, TT_DATA_ACCESS); + } } } #endif -- 2.7.2