From patchwork Mon Jul 31 13:36:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 9871843 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 C7389602F0 for ; Mon, 31 Jul 2017 13:38:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD356285C4 for ; Mon, 31 Jul 2017 13:38:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C229A285D1; Mon, 31 Jul 2017 13:38:22 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 1CE29285C4 for ; Mon, 31 Jul 2017 13:38:21 +0000 (UTC) Received: from localhost ([::1]:59620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAtG-0007CN-LM for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 09:37:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAsi-0007B1-4c for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcAse-0006Kn-WD for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:12 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:7206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcAse-0006Ig-QV for qemu-devel@nongnu.org; Mon, 31 Jul 2017 09:37:08 -0400 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 4A331562A4AEF; Mon, 31 Jul 2017 14:37:03 +0100 (IST) Received: from jhogan-linux.le.imgtec.org (192.168.154.110) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 31 Jul 2017 14:37:06 +0100 From: James Hogan To: Date: Mon, 31 Jul 2017 14:36:45 +0100 Message-ID: <1b88a351b0c447a2a4045a7d6979f62b4af96604.1501508116.git-series.james.hogan@imgtec.com> X-Mailer: git-send-email 2.13.2 MIME-Version: 1.0 X-Originating-IP: [192.168.154.110] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.59.15.196 Subject: [Qemu-devel] [PATCH] target-mips: Don't stop on [d]mtc0 DESAVE/KScratch 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: Yongbok Kim , James Hogan , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Writing to the MIPS DESAVE register (and now the KScratch registers) will stop translation, supposedly due to risk of execution mode switches. However these registers are basically RW scratch registers with no side effects so there is no risk of them triggering execution mode changes. Drop the bstate = BS_STOP for these registers for both mtc0 and dmtc0. Fixes: 7a387fffce50 ("Add MIPS32R2 instructions, and generally straighten out the instruction decoding. This is also the first percent towards MIPS64 support.") Signed-off-by: James Hogan Cc: Aurelien Jarno Cc: Yongbok Kim --- Changes in v2: - Resend based on v2.10.0-rc0 --- target/mips/translate.c | 4 ---- 1 file changed, 0 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 51626aead32c..0bca700fb380 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -6386,8 +6386,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; default: goto cp0_unimplemented; @@ -7714,8 +7712,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; default: goto cp0_unimplemented;