From patchwork Wed Jun 14 19:48:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9787345 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 0C29E60325 for ; Wed, 14 Jun 2017 19:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01021280B0 for ; Wed, 14 Jun 2017 19:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA120284F1; Wed, 14 Jun 2017 19:51:44 +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_SIGNED, 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 4EFBA280B0 for ; Wed, 14 Jun 2017 19:51:44 +0000 (UTC) Received: from localhost ([::1]:50618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLEKN-0002wi-IG for patchwork-qemu-devel@patchwork.kernel.org; Wed, 14 Jun 2017 15:51:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLEHG-00013a-OB for qemu-devel@nongnu.org; Wed, 14 Jun 2017 15:48:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLEHF-0008UF-ND for qemu-devel@nongnu.org; Wed, 14 Jun 2017 15:48:30 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:35153) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLEHF-0008U5-Iz for qemu-devel@nongnu.org; Wed, 14 Jun 2017 15:48:29 -0400 Received: by mail-qt0-x242.google.com with SMTP id x58so2210363qtc.2 for ; Wed, 14 Jun 2017 12:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=juTN3G7jcRs7VidChtiBlBH5P0f4srwHiaL79KaCS2g=; b=SN8hKny8yXZ8LE2NpWmvdYA1Y3J3NNWFMPQJM+VXJHO6bThCMRAEfB8w8F8NsShYxh iAqVdduzXhkQe/ilt8jHSAxpBm1LvIOEhkFh2hN+UD7Slk9pBCPYIM1a6HpzPYFgO/59 8lka+f1to3U1CTSwkMS21WCii8Mp3f6s+ILOd/YF/7BNM9UhVMXAvMIKdRMdjN4Lt7eS BwzRcth6D6kC/s0YaerA2of1rsmT/Dv7Xz7UrYwf66DHGgCuaAiub4rdcrdDK7ds7Pmq aw5RsE1btyZGON7do3vrqi0pQWFyeHaGlF0Y+/Bs6CmX+NirpQqkWG+t3q0l5ZQrLTzD ohoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=juTN3G7jcRs7VidChtiBlBH5P0f4srwHiaL79KaCS2g=; b=dOfv/s1ha6XH0YY6CFycvcXDtlQv6HYhShpKiBfw0wGKHq79vIddpH9d/yWLXtpGZu CqZ1ZHs7M9E0Uryhk2y1skdCVZgh3t/dKR9HbTiFd3ihsZAmHVGUGh57FUbAtj8BipBO wwfiJ6QeT4MwIDPMB5NkWZW+Z3lUZ+nl7J4Dp3jqfSY7pKxtf1bnX5Hhrr5+G0Q1n40z 7n+mPuTROqvgtIqGtW0SmQtqiI/5dlT7Vph/L920jJIdblIUllqEKudmWAzFgV3AT2TL sGdsmrM8fN+dD3APeYfr21DXYmLd/DdMCNIG7rHRCTfcwCpPc+IfA64doALTxxAazU3E WMCQ== X-Gm-Message-State: AKS2vOxo6MjuhBrU+Pby2kicypIM+uG6q+A1DIGxziYajsRAQ/wnR2Nv 6W8rdaIRXw3/B97ADXE= X-Received: by 10.55.20.156 with SMTP id 28mr1967162qku.191.1497469708844; Wed, 14 Jun 2017 12:48:28 -0700 (PDT) Received: from bigtime.twiddle.net.com (97-113-165-157.tukw.qwest.net. [97.113.165.157]) by smtp.gmail.com with ESMTPSA id o93sm628571qte.41.2017.06.14.12.48.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 12:48:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 12:48:19 -0700 Message-Id: <20170614194821.8754-4-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170614194821.8754-1-rth@twiddle.net> References: <20170614194821.8754-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH v2 3/5] target/mips: Exit after enabling interrupts 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 , pbonzini@redhat.com, cota@braap.org, alex.bennee@linaro.org, Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Paolo Bonzini Exit to cpu loop so we reevaluate cpu_mips_hw_interrupts. Cc: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- target/mips/translate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 559f8fe..891f14b 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -13403,9 +13403,11 @@ static void gen_pool32axf (CPUMIPSState *env, DisasContext *ctx, int rt, int rs) save_cpu_state(ctx, 1); gen_helper_ei(t0, cpu_env); gen_store_gpr(t0, rs); - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; tcg_temp_free(t0); + /* BS_STOP isn't good enough here; + reevaluate cpu_mips_hw_interrupts_enabled. */ + gen_save_pc(ctx->pc + 4); + ctx->bstate = BS_EXCP; } break; default: