From patchwork Mon Jul 31 21:02:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 708423 Delivered-To: patch@linaro.org Received: by 2002:a5d:6787:0:b0:317:2194:b2bc with SMTP id v7csp2523036wru; Mon, 31 Jul 2023 14:04:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEzaMOIwVWs9acIiiXNfJC35sZqJfup6cSNUINqfRZQVCXLllBYkBiFRMZxQj2n5Lnt8Y7d X-Received: by 2002:ac8:7e83:0:b0:40e:fbfd:95cd with SMTP id w3-20020ac87e83000000b0040efbfd95cdmr4948951qtj.7.1690837485287; Mon, 31 Jul 2023 14:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690837485; cv=none; d=google.com; s=arc-20160816; b=tqwoqRcX2z3s3SPUAg1mM4gnWqdzFpgsi4vN2lEDunh9WB795JTZGfqwnTi9qHkBTX eu9V+mrGGuJlOQSoa2VZmciZ0xr5xRC12akStFWzxVvK1iBcU3ifNQdKmhtcAIjTM+/R 3960KiSWEnkUPESz0+MZcHleuC7mSx93uEVRAFmd8GpNCH+GjC9F9EFND150HEK/QzPH pEgaZr8GaSzdiYrrzYMtd+6vWS9F/ldy5cW9lus9OzWs+l5ZnbCTk9iY0H4nzbrNQAeb Du0YmCMyLAE7DL9M+fXtzA3KKCnF7aCusJpxsWJX0NT+veQHk1owMxpkM80nvQUvAkvV 2LIQ== 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=VHJK3pOh2Y7OF4yiI5SRsx/aGbKiHXoxnDvDxXZ5OqE=; fh=ZK20qgHUgmt1WcmFXgLjQy/QZ0FdgiHLlQ3RCScWAXc=; b=b38RH4QVgR4KyAT5PQ4rlG0CXYZmQ8JLCK9ZKXDIBZ4XcgSXAO0awlmkb4PNBctGXj UoPkI9VCYfPW+e3f7b6EJNFk3PabFzYYWn3fUbNAcgk8+7ZXBg2NXOknX9x6hHRzFq6o T8eSQOzh7417rt7fgNdhu4yGMUr/ZiSoEOajFphWhhJlOVYJLLFgTIbcrsfU3LUwQd50 bWBdaakIfqRmcOFlzfSU6/fCsCfKA5mjL5I+H655TVCYKpMnvvPJAe4dZh21ZOjUH6B2 kWaeSWu5cIMPHG3vvzp39rg12BFY/BCPM4LMuOqAsXSUwinqvE2NvPOrfNnBbkKG92Ro TvvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mx05B3VO; 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 k18-20020ac85fd2000000b00403676c96e8si6570437qta.136.2023.07.31.14.04.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Jul 2023 14:04:45 -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=Mx05B3VO; 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 1qQa27-0000tS-Jk; Mon, 31 Jul 2023 17:02:28 -0400 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 1qQa23-0000se-Ho for qemu-devel@nongnu.org; Mon, 31 Jul 2023 17:02:23 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQa21-0006Pq-L3 for qemu-devel@nongnu.org; Mon, 31 Jul 2023 17:02:23 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bbd03cb7c1so30983605ad.3 for ; Mon, 31 Jul 2023 14:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690837340; x=1691442140; 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=VHJK3pOh2Y7OF4yiI5SRsx/aGbKiHXoxnDvDxXZ5OqE=; b=Mx05B3VOYI3AT0xTAhdfgJxtDMJ3A+N7XXwJ8a0l8Ul1CaAXKIr2CQ6CgWDRVdBNtb e8hLXI/CaUEuWFyfEarC4SGqqTZHwgXuDKX4xbCTnLBSQafMSUb6CVIuBTEVWOgFjMi6 sQWKbgC4nQxHykKGy7KumQ1q2dyFcZlWT5hdE6mhjc9j0msa7JqQnvPfyfA7yczbcDEQ Wun/YRlfUgomu9TVMEzRe+7Vs2Zai+6Y/CWZCDftD0zyxK74MbOiZ/3z24wT/5YosUxt 53hCsXV6hq3A04U+QXQA+YK6sgkFdQt7+/FUyJfjY+JvZnHtuzhIKMMe37WbWwHvGtel U2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690837340; x=1691442140; 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=VHJK3pOh2Y7OF4yiI5SRsx/aGbKiHXoxnDvDxXZ5OqE=; b=f4XZHK71gOyEj6jFRTvHnXqzYyhZ6dtXas1Rq1i1jW8OZM2gUgXRUU+jKhi4iPgGtl GMJm5u63Kmr3iknoFFCgqznu8ZuzCur7ZVv8MeisXsswvJas2tQg1uIZofuAYnpbcAK2 /J9gQSNkisssn3mmT91WliyYBuNFHN1RLf7hRAIVwsEoaL6sqe1nVvjw4DwaI6YTmaXd BYeetIy6h8vCaBcSstFh5NPZsxoCvLLli169HcjvdjNSISH3ZgdW4mubmF6F0X8rEJWg 3QnsWCm4DN2xIvUXxcudhYLP63ptqb4sA8b6QTY42ltrpACktDvrBCOlTp2fWQl6jEQq ICVQ== X-Gm-Message-State: ABy/qLYuyoFVjuQv0nP3cqHkvN30kiS10fm5rgiu66OUxoY1vYssxeqP gDiPgeQoxWQFiXx2LPiH0twaJURb5Ul0dNhKXpg= X-Received: by 2002:a17:902:dad2:b0:1b8:9b1b:ae7a with SMTP id q18-20020a170902dad200b001b89b1bae7amr11479324plx.34.1690837340145; Mon, 31 Jul 2023 14:02:20 -0700 (PDT) Received: from stoup.. ([2602:47:d490:6901:4f6f:6b:2de4:e0cb]) by smtp.gmail.com with ESMTPSA id r11-20020a1709028bcb00b001bb8895848bsm8924230plo.71.2023.07.31.14.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 14:02:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PULL 08/10] target/ppc: Disable goto_tb with architectural singlestep Date: Mon, 31 Jul 2023 14:02:09 -0700 Message-Id: <20230731210211.137353-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230731210211.137353-1-richard.henderson@linaro.org> References: <20230731210211.137353-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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-bounces+patch=linaro.org@nongnu.org The change to use translator_use_goto_tb went too far, as the CF_SINGLE_STEP flag managed by the translator only handles gdb single stepping and not the architectural single stepping modeled in DisasContext.singlestep_enabled. Fixes: 6e9cc373ec5 ("target/ppc: Use translator_use_goto_tb") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1795 Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/ppc/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index e6a0709066..74796ec7ba 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4175,6 +4175,9 @@ static void pmu_count_insns(DisasContext *ctx) static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) { + if (unlikely(ctx->singlestep_enabled)) { + return false; + } return translator_use_goto_tb(&ctx->base, dest); }