From patchwork Sat Oct 1 10:05:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9359113 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 15D1B6075E for ; Sat, 1 Oct 2016 10:07:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4845295A0 for ; Sat, 1 Oct 2016 10:07:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C283E295C0; Sat, 1 Oct 2016 10:07:43 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 5E237295A0 for ; Sat, 1 Oct 2016 10:07:43 +0000 (UTC) Received: from localhost ([::1]:54922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCn-0005sv-Ok for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Oct 2016 06:07:41 -0400 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) 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=MGMl6tO9Fmx1mbdhIQkI33LVzVPp2Ldr007P1rKZE0w=; b=qj0drcF9bXbrbuufO+iDhGRbLPn2HaTbjen0bGlTtqu/ZWi08hgELw9tPKjO/3M6iQ oUdzshCi3kTHnam4y0NPvs/Q7s/661aM/lYTw48uYuOqOhib8VEFF4eiPibPTqW3fYhq YuTYy7mGyUOoydHnhpfdJNEhPOMEkzqOfdhE4NRwIndXDvBME0S+6Pr3x0uXzPUYuKhv bszVqjB7NRnsqdXjquAxYm1lDJSQPpA07pB7WEzf3dGSxZl7pd+dH6VpzyroWWVlkQ/V T/aGPJyzXHAzxkWrw1+zNaScMvxByki9MNE/+lXFTjCDQSjmRfKQHYA6Ks2PvSwxqgNw iiPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MGMl6tO9Fmx1mbdhIQkI33LVzVPp2Ldr007P1rKZE0w=; b=HQVeJH3PWCkl3UNTV6MKfIxhXErxb6EoPlrC3+1MRGCLSqg72s+yFT6t+FfUqBO61A QNTNqqGs+0cHoSXSrKEfy66yh76UV9mHpgMC4KdbctlFqmyodcKr0Z1yn8cFlPbI7Dsc v7bguftP6g3ARRbZgX1/aRZH9jpcYRrunJ3Lfy9d5aP3eyCimDKxVt+cDMShgEhS1o4Z AVwWfhauvWf+M9nAalH/GF0MjXEzyfbTD22tipuYUWwookClRWVTjzsjW2+Yly1fe18h 3FGvrthI4QAYcqpemWAZj5JVf7Q7ZQatYL8kfFOnSji1n9D0YmU3lWrPpIVrymAujpS0 Ni+w== X-Gm-Message-State: AA6/9RlyVBxtIrWN3yRtX5EmXJou89miAUmrrDPi9u250UU6oKrz17+yY/axnwuAsu5hlQ== X-Received: by 10.194.150.115 with SMTP id uh19mr12063155wjb.57.1475316422441; Sat, 01 Oct 2016 03:07:02 -0700 (PDT) Received: from localhost (x55b4da19.dyn.telefonica.de. [85.180.218.25]) by smtp.gmail.com with ESMTPSA id p144sm8526263wme.0.2016.10.01.03.07.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 03:07:01 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sat, 1 Oct 2016 12:05:05 +0200 Message-Id: <1475316333-9776-2-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH 01/29] target-sparc: don't trap on MMU-fault if MMU is disabled 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: Mark Cave-Ayland , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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