From patchwork Sat Jul 2 06:02:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 586527 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp2076735mab; Fri, 1 Jul 2022 23:09:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sC7/DvLGVek0Jnahd5y/fuQT4Qwk0Ugv/3oAyL3KiyGUweUWLxi2niVwYNBsDPjARaIwCb X-Received: by 2002:a25:28a:0:b0:66c:8fc0:27f7 with SMTP id 132-20020a25028a000000b0066c8fc027f7mr19119303ybc.312.1656742190945; Fri, 01 Jul 2022 23:09:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656742190; cv=none; d=google.com; s=arc-20160816; b=X63lvJDbFIHVLoq/jP/RUspYq3m72i0Sarbf9FwexsupMbieYn8o9xamRWD1syhXaE nGCeDySgjxceMAFkVwp1583JofcpTb8HkJnR1noeIzIIlDyMKMqhYheR7/jiUuLWkSBP 2m7JurKNBQFCULZYOfei6XFvXwYVR7vvJXYlLPbZcBACqURBcvbzrge+ogpMbyvdsLBh PfbHqwiJlp090B93NDaJANsU7QU97notxBXpdBrfio5VfQ80kv6BPlVp4pfr8lcKiLqq YFP5+7dFS8Ai2mwG1W6+r5MlWcJeZ/V6h+YNtA5seHtXSnK2ovuTNEztkLAd7SjDCMgk B+2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=0z7Tq+EQ5JIeXAT9hPF2LP0Lw1OVrZdX/VMO6ZXV1NbhecApUSlZCzBUy05m0b6lbk tIKQhhdbBeWDfO/LNv92sBcNMEMJhwOGc6XLBDQ5b+kg8fYGtkaDIaUA2C4cmtsXbO56 8SEev5r04S+6S9j0vdo29egd6M7ZTJd4Hn10YhZ5Eyujzp/kyFfWTjrxKHlhwp6iLtHg SAe+DobM/H5OrJ9gOml5o0zpQJEG5Pcurz+60J7poHcCRmkFpLn4txVbrHmx9u4iKzhk KY9t3vLO4CmSSWJXbMQNpIp4pZGXjS0jtnZD/6UZ/OfwJN567o/KahnYZywidzRNHmmf W6Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CRCBep4Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 184-20020a8119c1000000b0030c5a2eb3casi32138176ywz.206.2022.07.01.23.09.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jul 2022 23:09:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CRCBep4Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7WKE-0002Hl-GY for patch@linaro.org; Sat, 02 Jul 2022 02:09:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7WDR-0003Cw-V7 for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:49 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:46843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7WDQ-0004sp-Ga for qemu-devel@nongnu.org; Sat, 02 Jul 2022 02:02:49 -0400 Received: by mail-pl1-x62b.google.com with SMTP id q18so4160037pld.13 for ; Fri, 01 Jul 2022 23:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=CRCBep4YA3KLJs2P6ugE+pCtNc8XR9Qbbqqp9wpjnIwdl83pbl5GewLVBEkwkxmunQ 4I10zr7Ud8e2cZOeUcU2E0UCLsknTdoWFLYYscKRnUe6QP1kUAbynEv5xxB+LtbkpIYo C0bTLo5V1Qx/JxSinlXRphvFL+g5AlICgRUWBSFTcQUsFc0vD0M08f4Ef+WjP6WsLHYN JoUtNC7tMhevKFv0pxkdtM9tgQmOX4GpDhbNWCKgiOqVO28A4EI0f1uFQDkkYYxAH3Jl dF4WSHY6qhQ8K1nq5aDFrh4KeVdSXnmcjj52nnY8ia8LgkgArfzMczCe/UPHEMoWL/Rd p48A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xm7U7AL4nOnjycULzYDw79xiqJVDueo/kCsQJyWcsKU=; b=J8qR9gA1P/o8gtz8EiBGO/3sTH8DtzQr8sUIKASCrtWgaJ/vbxGTu1TZLxHX7uIj80 zOdTOoE+pp5MJT9vY/01gj53R7nARFE0Y1Qbqwfsd0gqmdM0LiYD/jlYWwamIkBv48AO +U8XZ4tDjZUwEiedpBT0jNHcCDIowbc7qdYXPjNBzBTDMPwsQN+LeA8chbRauTFLj1S5 g5Ves4lkzE4a4dMu4CqziT5dEJdz9WqaWZOB796Qenmh1rYI4DNWm2ygF/bkzERAKWa/ y/Odjjx1pFmrTgIxErh2VUuHj0G77HPA/8o7i7jkA6fvToDPTJDwM9pmLcnlRX5Yi3YQ MOtA== X-Gm-Message-State: AJIora/gc7mwN93KyM6M3UNNxmqvU88P3+7tfIETHl36f41/Dm1kVsyd bFVPzwgP5ri1TDYEsDDUmcz/2BLwwKzGrxaI X-Received: by 2002:a17:902:8216:b0:16a:6376:ef81 with SMTP id x22-20020a170902821600b0016a6376ef81mr25273603pln.2.1656741767190; Fri, 01 Jul 2022 23:02:47 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a66c200b001ece55b938asm5232178pjl.32.2022.07.01.23.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 23:02:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: svens@linux.ibm.com, qemu-s390x@nongnu.org Subject: [PATCH v2 4/4] target/s390x: Exit tb after executing ex_value Date: Sat, 2 Jul 2022 11:32:28 +0530 Message-Id: <20220702060228.420454-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220702060228.420454-1-richard.henderson@linaro.org> References: <20220702060228.420454-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When EXECUTE sets ex_value to interrupt the constructed instruction, we implicitly disable interrupts so that the value is not corrupted. Exit to the main loop after execution, so that we re-evaluate any pending interrupts. Reported-by: Sven Schnelle Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index eac59c3dd1..e2ee005671 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6593,7 +6593,7 @@ static void s390x_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) dc->cc_op = CC_OP_DYNAMIC; dc->ex_value = dc->base.tb->cs_base; - dc->exit_to_mainloop = (dc->base.tb->flags & FLAG_MASK_PER); + dc->exit_to_mainloop = (dc->base.tb->flags & FLAG_MASK_PER) || dc->ex_value; } static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs)