From patchwork Mon Jan 9 20:08:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640688 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2339387pvb; Mon, 9 Jan 2023 12:20:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXukn93a58QyD5X912Z1zA58+sUzhCRG4SMHgWXl5bdM/GvI7ZfJmYnY4NjZOzoTdN4yazoN X-Received: by 2002:a67:cc1e:0:b0:3ce:cae4:754 with SMTP id q30-20020a67cc1e000000b003cecae40754mr7899900vsl.16.1673295641583; Mon, 09 Jan 2023 12:20:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673295641; cv=none; d=google.com; s=arc-20160816; b=D/Mhyf/7RcvbRgpUR9XcMjVPjX69ESIOPMobr6hkHJarUvuHVmPBthdURpLP4MFVtX nW4TWxdzpAdZUaJjJ/G01CFRou7EVbMoGOak/VX7pabbKlM34z3U7IcsiAAz1sB2FXQO Yrh9dpDaRlzZBAV27WJGefkJJYUIDhhRDWsBf3fDuNDgZ7LyS0LbpMyrpcH56zL/hjyZ KvouvXitX+rgx86J0T7/cHwaAZAB9GSXuPyPgj8+SI3szX3eB+bsaLOloupAEQSMRFqo 4Qf/sEZs0XI3hXMRO/Mi0qcHpoXGmndrp9DRfxqYCCHfKtV9839ewEw/Hq8yKWRqOqJZ Gvuw== 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=qoDF/rY8HtyNlykYqkZFXY86Nrt61o0/K7nWThd7Dr8=; b=bSTT/yvWsSm9PPNxzORqdeiFp63rgiO2Kf3SKxOOiJrZ3zZHGysMqu+hiIpDLUagYA i77VPgEpfsmIWE6gmiLj4Kr0wQOTx5pmS5RVXqzyDaHD3w71GALvKhfv+LCMbYv+SxfF Bt4fyTJLhXHXlezCkW8+0Qoksuo7gPUYomkchJ7K3FVhlh1yx4tWPHMkEfsHiF7gBhhX lykddv7APnuwLjPPzvlV27GoMoKixT4gkUIFP83H65y0pT6ekrYQyG/YL6a7aVP5h5wJ +KzYLWnl9Sds54OP4dFLEJ4gC/n9Qg98E8OLhDt7ZZqIkJ7WbOyOLrUvh5EMgp0h0ClN Mt2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C55XT/Y8"; 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 ay6-20020a05620a178600b006fc94e5f1efsi5318050qkb.175.2023.01.09.12.20.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 12:20:41 -0800 (PST) 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="C55XT/Y8"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEyRv-0003Lb-RU; Mon, 09 Jan 2023 15:08:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEyRu-0003Ko-I7 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:50 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEyRs-0007Yi-Sm for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:50 -0500 Received: by mail-pj1-x1030.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so13994700pjj.2 for ; Mon, 09 Jan 2023 12:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qoDF/rY8HtyNlykYqkZFXY86Nrt61o0/K7nWThd7Dr8=; b=C55XT/Y8pcqTS9wJxPULL0JkLdEKLwdtO7ffSpOz8+67bzCfu25VFz7xovjoLLPE8F KraNpNs/qV0kAlaSKTN+inChsSFrNfkvnMJlRetxxzdhO5NxYVVNqnk4ZZxwwXu6LJzW XLnikOCG/RRiGeRgzcG1YdUoDJumPQGUYJfEqPdt/zrmay9ZLOifTMGrk8bhFdQ1CTDR KGzsZZlVWrHNalLg3EPgriciEtA4Vc5KOL8AuYen4CJhyBiEvK37YHMCwm/s7Br2Pyzs AL9BVtIz/lZ5ZaOsPAuTskxRuCzYewTeTp/xa7T6bBCesS/P7GjRitn4J5w8/75AXDuv Xmwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qoDF/rY8HtyNlykYqkZFXY86Nrt61o0/K7nWThd7Dr8=; b=E3+IiBQHAj29taewJ4RzUucmkczwEDv/RLZ4n22VYUf7vo0SRcmpJmdeA6quUGhVuv BtkGc6n1P8JkuRQqJkbywKrV2IM4jk+vqrhk7Opt2TzWsLifpMLPwZ3lcdDwRHQ72ciW yR0WklchuVeKDh6yLo95s5a3DbGrC1xWtKAtZ7AXKa5WTRSIPZWniUYU60vf+qHhyZ42 8jC2/5lA3eqOPYYi1rO1u+p4LGEP37czVMzqQF8I0WcRoAKDD5sY3bxejIP9msG67KV1 EBM2mLbqIURhMleEtBgdzwnuA4jGxjUzMfig7PWm84E/YDzJPc1sv9LtNE5KOVLWG2TW hFeg== X-Gm-Message-State: AFqh2koqAgnu3ZSG3QRZHoTFHcqhLmCDt04uuJIQQNoUpMgyCODR6iU3 p83n9wJ8Uu46orf2T1AJV8SBOQFAeUbZN2QE X-Received: by 2002:a17:90a:7849:b0:226:3a7c:f248 with SMTP id y9-20020a17090a784900b002263a7cf248mr42388845pjl.24.1673294928131; Mon, 09 Jan 2023 12:08:48 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:158e:facf:7a46:ba9f]) by smtp.gmail.com with ESMTPSA id l2-20020a17090a384200b0022727d4af8dsm577574pjf.48.2023.01.09.12.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 12:08:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v3 24/27] target/s390x: Fix successful-branch PER events Date: Mon, 9 Jan 2023 12:08:16 -0800 Message-Id: <20230109200819.3916395-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230109200819.3916395-1-richard.henderson@linaro.org> References: <20230109200819.3916395-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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 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-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich The branching code sets per_perc_atmid, but afterwards it does goto_tb/exit_tb, so per_check_exception() added by translate_one() is not reached. Fix by raising PER exception in per_branch(). Signed-off-by: Ilya Leoshkevich Message-Id: <20221130174610.434590-1-iii@linux.ibm.com> Signed-off-by: Richard Henderson --- target/s390x/tcg/misc_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 576157b1f3..e5015daf07 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -618,6 +618,7 @@ void HELPER(per_branch)(CPUS390XState *env, uint64_t from, uint64_t to) || get_per_in_range(env, to)) { env->per_address = from; env->per_perc_atmid = PER_CODE_EVENT_BRANCH | get_per_atmid(env); + tcg_s390_program_interrupt(env, PGM_PER, GETPC()); } } }