From patchwork Mon Jul 2 13:57:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 10501465 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 69C496035E for ; Mon, 2 Jul 2018 13:59:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58C1328A71 for ; Mon, 2 Jul 2018 13:59:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CC9528AE8; Mon, 2 Jul 2018 13:59:38 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 EBDF228A71 for ; Mon, 2 Jul 2018 13:59:37 +0000 (UTC) Received: from localhost ([::1]:32939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzMf-0003Hz-5k for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Jul 2018 09:59:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzLN-00026O-Cw for qemu-devel@nongnu.org; Mon, 02 Jul 2018 09:58:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzLM-0007nJ-G7 for qemu-devel@nongnu.org; Mon, 02 Jul 2018 09:58:17 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:46152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzLM-0007mu-9y for qemu-devel@nongnu.org; Mon, 02 Jul 2018 09:58:16 -0400 Received: by mail-pg0-x244.google.com with SMTP id q14-v6so7184234pgt.13 for ; Mon, 02 Jul 2018 06:58:16 -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 :mime-version:content-transfer-encoding; bh=4kKcrKeV9F/Qdu736T7k95sF9L6dvtl4xdV9jCWRIzA=; b=GVuIY9nFnjgt+PYqZRXdZM4SkeqhxyiF19y304CCy5XfKz6vjQEbBhp+iJXY+BNJtV RSeFPoVEBEYZWWsEkrQdX4E7mABVqyIpcNGucPM2sLkmzuVaP/Gl2Z6uX0C0A6MsQngs LSZvrV+JMeNKm3iY+A01wS5sEpHISnH7KIlfG1Medzsa16jGawRRVcru/E8woONT76rm dogaQM4dRyJMbonwC2y/Oyto6fAqWBFe6QANnVzJTc1JYYR/Fb0XzHk3dfnh3pFqXKe9 QU/a+vnoVBC4cJNBym3kfUavxbnCW+BR33razyv2QVCDailvAkaROJWlNNm4V7M594N+ 74LQ== 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:mime-version:content-transfer-encoding; bh=4kKcrKeV9F/Qdu736T7k95sF9L6dvtl4xdV9jCWRIzA=; b=Y9ifKv+qTDduOWMOP/Nt9F8uWK+w7fQ3ycyvm3y3tu4/lX5hsPrJu1OTkT47hC+b6j Q7nexBCXPIOWv/J84WTS9OJci3Aew7yTlx4f4KqxnN+/HsEZ0PfkFCiMR1x/d6vM3cby 0HK7oNEvysgK6t2aro96bjFKKUrzqbJ040i88uJWjGN5n6lo5uy3LojzjWxjANKjHE7W Wwk2RRnZdrmUcf+S7aTPYClt5hM1DIQ5C9mUARFa8OkGh7akKsr05LwpX+C7NaFKISnR IYwoy8m/14KdXC9lfOgkerh4I0mIIwJ6qVw6gb629SZj1C+22whU9xsry26JvQ9yZ3vB qvWQ== X-Gm-Message-State: APt69E0dd4gnMUA50+N1cWvGmCwZZYdh5BnOYe/IpFLgIcCxPdsrjy2M o6ESa6zCrGN5t1gGKTW1lpU= X-Google-Smtp-Source: AAOMgpfyvqJRVuKtBgIg7PUIyzC0AGNJrIo5MITycDslIfeEoHBDZxkWdu/0uD/g5Xnp5HneZYcF1g== X-Received: by 2002:aa7:8004:: with SMTP id j4-v6mr25343025pfi.174.1530539895309; Mon, 02 Jul 2018 06:58:15 -0700 (PDT) Received: from localhost (g90.124-44-6.ppp.wakwak.ne.jp. [124.44.6.90]) by smtp.gmail.com with ESMTPSA id q9-v6sm23098124pgv.84.2018.07.02.06.58.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 06:58:14 -0700 (PDT) From: Stafford Horne To: Peter Maydell Date: Mon, 2 Jul 2018 22:57:42 +0900 Message-Id: <20180702135806.7087-2-shorne@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180702135806.7087-1-shorne@gmail.com> References: <20180702135806.7087-1-shorne@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PULL 01/25] target/openrisc: Fix mtspr shadow gprs 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: Stafford Horne , Richard Henderson , QEMU Development Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Richard Henderson Missing break when this feature was added in 89e71e873d ("target/openrisc: implement shadow registers"). This was causing strange issues as we get writes into the translation block jump cache and other bits of state. Fixes: 89e71e873d ("target/openrisc: implement shadow registers") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Stafford Horne --- target/openrisc/sys_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index b284064381..2f337363ec 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -98,6 +98,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, case TO_SPR(0, 1024) ... TO_SPR(0, 1024 + (16 * 32)): /* Shadow GPRs */ idx = (spr - 1024); env->shadow_gpr[idx / 32][idx % 32] = rb; + break; case TO_SPR(1, 512) ... TO_SPR(1, 512+DTLB_SIZE-1): /* DTLBW0MR 0-127 */ idx = spr - TO_SPR(1, 512);