From patchwork Sun Dec 11 15:27:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 633076 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1991810pvb; Sun, 11 Dec 2022 07:30:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YgbL7nkuj3hAyoYkXA4Kvxte//GLm0Iy9kzlR61Ki3uVqso7Y/iRY6ZUtxNlVITzLsDkC X-Received: by 2002:ac8:7772:0:b0:39c:da20:68f with SMTP id h18-20020ac87772000000b0039cda20068fmr16516859qtu.50.1670772635863; Sun, 11 Dec 2022 07:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670772635; cv=none; d=google.com; s=arc-20160816; b=cpUNG+VC0ikWe8sEfMfiJrb0KIAPdOMOz7RCUltZLQQx6HSlSguhl8jtKdea3B3U3b DHMvi8ePqqjQfG8DWckJ6nKBjL3VowaKl4oV3yDhWkqRucFiSo6qiWTxPGX3qpXknxC6 vpVI4ITCX56rj+BPPpS37I7Ipvf4NZOy5rBLLN4lvWl40QUw0dUYaXyk9P9zE2POi2Wx j2Plqo1tdsOufOFbWk+Pb63/iY0NQPjrHoSA4m0HJLKCOa8bcpOvKIP0e+3LfLmMixSx 5Ku1NbHiwrRW/pyyAG2i45+1Gx/x269VLwtX+TC0JRAOLVMNtfu4kvVvmoYJskHZqJCt A/+g== 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=PnKVNWuy81wpLO8ctWZ75eeyyzKWmrB6j7VstOEmj/M=; b=W0mBNcaYL/SGKR2Bir7FaiJzH/KdIThv4tV3HfCOl3z98KBOguHXOF+lWBFK2e85hp Lp6xqrg8lTkB5bNTHZs5hKEjqFt2wszYeBOMYMqG9YjqCWIZ986MEMYSnNPyklm/lUFM +rfa73uAHjjzxAlorNJCfHlxwddvxIUumnAmb3x78yiw4LdUiCewUGYwRORW/l/1l/3P 6b2attI4RVMp0XuS+hZ9u8HVmcvuHZRiZApsuzCzM8BQhhKMpD06Ufr6fO6bETZ3vpsk 4AEWS/XcisYy239YLaifnMTgCCR+aSCVZnivib3D7JDT4rg6eEYRdyjrU0lZKjtTivl8 upMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LFVMmBrp; 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 k7-20020ac80747000000b003a7f5e516b0si3912376qth.592.2022.12.11.07.30.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Dec 2022 07:30:35 -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=LFVMmBrp; 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 1p4OGC-0006pn-Tu; Sun, 11 Dec 2022 10:29:00 -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 1p4OG1-0006XW-BF for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:50 -0500 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4OFn-0007Vx-E2 for qemu-devel@nongnu.org; Sun, 11 Dec 2022 10:28:39 -0500 Received: by mail-ot1-x330.google.com with SMTP id m6-20020a9d7e86000000b0066ec505ae93so5831058otp.9 for ; Sun, 11 Dec 2022 07:28:34 -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=PnKVNWuy81wpLO8ctWZ75eeyyzKWmrB6j7VstOEmj/M=; b=LFVMmBrptS9d+LuQp5JU+rmkEzlEYy8oZj7nmZ8kNN5bh2IQWy0Rl83UkrCmflHO/d lkX3NLymrTXdD/lAxeWkJtj8sA+R9dp88VwSmYGJJuQhG+kcrk3uR3VZM63Z+sWktPwT OGe6kzlubAfaLUc7pcO+kgwW9JyKz2jmV3NOUqIupkOgeeQdT+Yb4VR6KkR1dvPARCXQ qiRXrzxiaswUbesa+wc418iFb51hdDrPyJ/c/R5D+3vXjSZcq0g/KJCrpNjUUm4KLGdb bcsXjYDOLJEvT6r3cwOGiCvOplhvKHvYvOWwmswEZyD7Ea0yX0xKeTmQsqMqawlw7cdx jqfA== 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=PnKVNWuy81wpLO8ctWZ75eeyyzKWmrB6j7VstOEmj/M=; b=gt1R84ZK7u7JOnkizmATBRjrCV/d9M2R1J1RzMVo6JbBrdDk32q0SnoJhhIyLWPnoW GGfPiGsAnveIa/WAl7JUvZS/8vDzAJ7f1kJVV4i9F6yLS+7cEeVUzFBvrFYiR++xgGCM vFGCT+vIVpEthhUcQ8pnmZ5pFpyFb6HKY237o59jaIOMRDoTOpJ+4PmUmSZoxNq0Cert jUGBRBT/AriTqyfmyixtCQ4dWteB6MGK4rt2Ewvyk9WQ39KBbRncmDbF5N9oCgFKTS5Y hXHGlxQnwfByq1/aenppKnEiJNddLJSSLl5pS4qH/+DL7oSJupDqx9++AhN6X0+hG6Ij 4Nag== X-Gm-Message-State: ANoB5pmE8svAZaWkBRhzStsxb8umppql15HO40Y9hF0YdpW5cguMHH8z zs9vFGchwCP4yfl6KuXzIAZrUJ/XYhRYke98RBw= X-Received: by 2002:a9d:64c3:0:b0:66c:43b0:5667 with SMTP id n3-20020a9d64c3000000b0066c43b05667mr4820953otl.38.1670772513156; Sun, 11 Dec 2022 07:28:33 -0800 (PST) Received: from stoup.. ([2806:102e:18:2efc:7b4f:f28b:eca6:b583]) by smtp.gmail.com with ESMTPSA id q24-20020a056830233800b006708d2cd8bcsm938140otg.65.2022.12.11.07.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 07:28:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v2 24/27] target/s390x: Fix successful-branch PER events Date: Sun, 11 Dec 2022 09:27:59 -0600 Message-Id: <20221211152802.923900-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221211152802.923900-1-richard.henderson@linaro.org> References: <20221211152802.923900-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::330; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x330.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 71388a7119..b7220cef44 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -619,6 +619,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()); } } }