From patchwork Mon Feb 20 18:40:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655127 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1553707wrc; Mon, 20 Feb 2023 10:49:09 -0800 (PST) X-Google-Smtp-Source: AK7set+ZFqU1/4aLNHk9BUbtdxTL1lAlalre/ZkWG5m1kF/RhESGhz7mJG+jmSjNR0hTj6283ioW X-Received: by 2002:a05:6214:3017:b0:56e:bc57:d646 with SMTP id ke23-20020a056214301700b0056ebc57d646mr6163761qvb.43.1676918949635; Mon, 20 Feb 2023 10:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676918949; cv=none; d=google.com; s=arc-20160816; b=yVgQwD8Hc3SP/Yy8HH3y52G45KqW6ruc2DUxFO6xkas8q14yWiqAaIGC9v5oFTHrVB 5anoKri+c/zlcVTb3/L2z1+1ptR+G0VDx6juvhUMxku0QYhQ9c1r88TpMItyt3CryzZO N14ILVWWiCI51+NbGoMUBo6EDjThAItajqRdGKt/+KedfmtDTEsV4eyTjMnPyaCAedYF hOn2VAqC0Zs4HqhRDtmvrZah5svA0cls6/Zxd7VRWNj2QkYhQSXYT91LTQIR3yMCo84P ftHi/xRHx8rH8qc5XwDpNlZfgyZ2e5m3EyFVUBHYBgrVI9hhP4QyKbv8+Es3/+rWzt62 z+sQ== 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=N9Q2x+DZbVUDZBYRwhREtdvCB+5xMfYBcFfsKwKL4697YBKoiEfgMPrPrrHKlr+I5a xmySnm8XI8awheLjoQxUYdQZ8b/wu1wXVFVAmDMCnAKaHYfu9zX3oGfxty+Gu1/osXLk SJ1I3vwLdQJLJaxyJ6J3JEgDrlS0PfVOWeGGz2wpHG4Ez5qiuGsZ2sGbu87MzkMTqmS2 u06szG+g0uCRvkvQsU+2P/RT14UFKm5LST5uJOhlMN3YKNhPtn4QKM+NKObpf0q4RAaF wbgyaDULWte6zGR4vdlTFU0sgD9aX2oEqVo8zOTEwi+BH2LcLpm1gXXkt6g1XCindprY JaNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hvKZ9EHh; 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 n2-20020a0cdc82000000b00534c9b0c715si10080612qvk.468.2023.02.20.10.49.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 10:49:09 -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=hvKZ9EHh; 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 1pUB8H-00078K-5s; Mon, 20 Feb 2023 13:43:25 -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 1pUB6g-0004fS-BR for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:49 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUB6b-0004Fr-S9 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:44 -0500 Received: by mail-pl1-x629.google.com with SMTP id p1so465188plg.7 for ; Mon, 20 Feb 2023 10:41:40 -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=hvKZ9EHh3oPRQ8HtkJH8ytJZqi/cJDNPCaK2KZLK2NinzQ9qrd1aY9Cc++A7OTy7GH xICeDYLv60x4XXBV03p1BNVnlvciDNTMRNBUdkk5MrPvEaCB818AJSgBhP2FsaZZB4Wa C44MJtW+0pFKVLvHALyO8YZfex2rPJyf2hIeOU2ufRP2gNdtyRIhHSjFbyOVH7MZ/evI 20D+nC4OXOM+yN9bma+rdCXkGRlV1t0dGYeHL4721NQqzivSTjDZQ9w1qLHv3YuYJPUn fEvGLva+/zKOvyROhCKbVb8cl3qsPPxHatc7gQlUtt2LaKJ0QIUlDuBkvrXcGF0yQifF eBGg== 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=vIKbql3XcQax+xWcoSirptMwS7UHKB+c2fKF0uJuDiR4nHP3qVRfxFJOaJbKFLiVR+ 5TskbHTJ1l0DT6Ay5hb2/unto2R9246pbQESAX4ZbI9XMCZIyeHsM1Mh5kQ+TDBfDotw zdNwgPRwPeygnArxdaoFpV+d+TefvdpKJLaiZ9C+w44p7/2WVdaB31jU2MhlPJ3gnGAs SlHtAfnGHx3bQilNykFCV9l77Fa5gtNTYmOQXJceC87RNs0CjgkPfMdMC/vCL775w+ji fGU4IWhduaBsYHINprxFSOv9MnyT43eL63m2kUNzcghtLs3BxplaezyCxyRd7jT0SwJT 3lVg== X-Gm-Message-State: AO0yUKViZJHU51mNSZV59BNrxLvBwHoQcT27XUPOQIdM7+b7jFuey4QT PPEyc98YaOJyuqCb855p2U0RkA0Z2xEVjzRubVY= X-Received: by 2002:a17:903:32cf:b0:19a:9686:ea8b with SMTP id i15-20020a17090332cf00b0019a9686ea8bmr2131952plr.28.1676918499833; Mon, 20 Feb 2023 10:41:39 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id jk20-20020a170903331400b0019258bcf3ffsm1911676plb.56.2023.02.20.10.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:41:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: thuth@redhat.com, qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v4 24/27] target/s390x: Fix successful-branch PER events Date: Mon, 20 Feb 2023 08:40:49 -1000 Message-Id: <20230220184052.163465-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230220184052.163465-1-richard.henderson@linaro.org> References: <20230220184052.163465-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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=unavailable 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()); } } }