From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6OQF-0005UB-1L for qemu-devel@nongnu.org; Tue, 08 Dec 2015 14:59:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6OQB-0005ht-SS for qemu-devel@nongnu.org; Tue, 08 Dec 2015 14:59:38 -0500 Received: from mail-qg0-x22d.google.com ([2607:f8b0:400d:c04::22d]:35778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6OQB-0005hk-Oc for qemu-devel@nongnu.org; Tue, 08 Dec 2015 14:59:35 -0500 Received: by qgec40 with SMTP id c40so33634120qge.2 for ; Tue, 08 Dec 2015 11:59:35 -0800 (PST) Sender: Richard Henderson References: <1449241262-3002-1-git-send-email-azu@sysgo.de> From: Richard Henderson Message-ID: <566736A3.30503@twiddle.net> Date: Tue, 8 Dec 2015 11:59:31 -0800 MIME-Version: 1.0 In-Reply-To: <1449241262-3002-1-git-send-email-azu@sysgo.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH for-2.5] sparc: allow CASA with ASI 0xa from user space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Zuepke , qemu-devel@nongnu.org Cc: Peter Maydell , Mark Cave-Ayland , chouteau@adacore.com On 12/04/2015 07:01 AM, Alex Zuepke wrote: > LEON3 allows the CASA instruction to be used from user space > if the ASI is set to 0xa (user data). > > Signed-off-by: Alex Zuepke > --- > target-sparc/translate.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target-sparc/translate.c b/target-sparc/translate.c > index 41a3319..63440dd 100644 > --- a/target-sparc/translate.c > +++ b/target-sparc/translate.c > @@ -5097,7 +5097,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) > if (IS_IMM) { > goto illegal_insn; > } > - if (!supervisor(dc)) { > + /* LEON3 allows CASA from user space with ASI 0xa */ > + if ((GET_FIELD(insn, 19, 26) != 0xa) && !supervisor(dc)) { > goto priv_insn; > } > #endif > Reviewed-by: Richard Henderson This should probably be merged for 2.5. For 2.6, I have a branch with substantial changes for the sparc backend. Part of which totally revamps the way ASIs are handled. I believe it gets this right. See git://github.com/rth7680/qemu.git tgt-sparc r~