From patchwork Fri Jul 28 17:35:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 707548 Delivered-To: patch@linaro.org Received: by 2002:a5d:6787:0:b0:317:2194:b2bc with SMTP id v7csp1081631wru; Fri, 28 Jul 2023 10:51:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHGS0tn/c5NNVySV0Do6n9t9z78oWd/Abon4eKFnRGcjCKd5m4i/JObJM0NU+7ampgW5IGA X-Received: by 2002:a05:622a:54b:b0:405:402b:9d61 with SMTP id m11-20020a05622a054b00b00405402b9d61mr3479378qtx.42.1690566717937; Fri, 28 Jul 2023 10:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690566717; cv=none; d=google.com; s=arc-20160816; b=udLRx6FQ/eWpyTQ/zYdEfFyrdLhb6cBD6aO9DlgxtYw47TpVW9HqFZtF5rd7dbkQ8I ML8FosGl4sncYw4rPz97PltOdrPwRhKXiTBJqYobjj6sNiHp2MuLCI9mSgNpnL/9tJam pHWnVzK2xS6GbU8rDZWllit/SX2VY7qyqnjibMb9Hj6ubdUdMYiUuYiOPbNb1JCC1Bpt YQ1hMYAFYvxU6vJxlhIwmstPR5q7OuxaQvGOdW/dkw6VlmSTDUaiD9jI48ymbjcbMfe9 OXS3lyfVjsI72U6rEZ+61d3povodDA3O2g5tk6KesqKRWn7CWeLWgF37JoyO6GgzaMU9 DrfQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=ACJP/cSQlj33yExohwZEBzfmCkDyB3Wg5IYx7mUDA/A=; fh=n9Dbk+urhkx2iA5q/fD7lmY02ylG7iad4NMn580RTCk=; b=ymyceINQzif8BzfIgMvmAR8yKYFOYurM3DMqN0kF/yLJc4WwP4dAh1vjgJzHuGNJSY hPLXSvGt8lL7Fa8tJJN5xhbjiPKEXEuI/miY0+km1TFHBAWBdpaIuKm3DV1V+IqXi590 yOBLdkLPlGKLsQW4+Q7clM295ZAe9AXUwnx7Wit24O0lzbH9Mv/XodviGRi/TTkOFMgM +luf8MVqZDg837Aw04vVOzLKn4NhCP77BsGFOTYDl7dnyqND1Tlwz600zYln48QQar6o J/QrFbkQH1W9X61muwjral+mZs2qFwv/YBPqDyZONl06hXfQfGPYGUe4JRKJOuZ4aqQv ng/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nzcLBorQ; 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 q15-20020a05622a04cf00b00404132d0856si2503522qtx.178.2023.07.28.10.51.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jul 2023 10:51:57 -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=nzcLBorQ; 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 1qPRN8-0007Ni-Vz; Fri, 28 Jul 2023 13:35:27 -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 1qPRN8-0007NS-0g for qemu-devel@nongnu.org; Fri, 28 Jul 2023 13:35:26 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPRN6-0004vf-Bg for qemu-devel@nongnu.org; Fri, 28 Jul 2023 13:35:25 -0400 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-26837895fbbso1714338a91.3 for ; Fri, 28 Jul 2023 10:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690565722; x=1691170522; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ACJP/cSQlj33yExohwZEBzfmCkDyB3Wg5IYx7mUDA/A=; b=nzcLBorQHRlrUvpNb70CrsOL29VHZpRdyqTelcftm+lsOGRE8P3p/D/WvQOyNGbQPc 1oQRXZyrsoAAD4By3dXBpepFN5pLR2vv/56VJI7e2gFtMlg5FKYCTLbfZGGwiXA15lJk zlChX0ZPI6SJ4CT+q+AOvnOIfnBWAJWoUsPuJnPBiOui7jtmFQ29x7cVDFayGng4CoSr kg9q6KUPg0u27L7vwXBkcDrIkorIxq+Z2S3Iy9c3iN+U0fAG/QXsuAlHatUGtXtPsTGe sZUrNM1N7xFkM8eVrAczbHDKD6pngQh5YQDzvX0xLM0FMtUSsmwdUePKv5OmvO6YyVjF sXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690565722; x=1691170522; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ACJP/cSQlj33yExohwZEBzfmCkDyB3Wg5IYx7mUDA/A=; b=CiHQjcE+rBP2fJRd6nLtjOSw5T117Icx0rtAmw46ACHvioqhR785j6mKh3IhIQ5nyl RgtxI9CyD50jGZ5QQOnbM9FpWbdZGBTgGmBVPKAUw9mmnsQsvgOKaADdWDfHgGvgo4D6 8cRvlR39OOFElfDBAevTA0vyNV1k33v3HQnwsibwMMolM8BUCMDGeKNyKJiNt/TvLhR1 hL44aua8xrGRZ96vQvKI4myBp/BV8cfUK1N9DATzdAL6dNEGZ1OMW/4Sd+IjVBK0T5S8 pfsirCLE+GK6QV/kIQOcFtcDgytiSZ8h7F7OeQ3UuR8uqVyZQhsLZBpcBSGFregq8ydW Dldw== X-Gm-Message-State: ABy/qLYMhXubq7r+XZmTvKPzMeh41DCYHQ1SqEU4s3XosDO9HGkffKgs x1U37JmEH5MicgW+mjOPsZWqMO9GeLgfsU+gO/8= X-Received: by 2002:a17:90a:8c0e:b0:262:fbb0:8737 with SMTP id a14-20020a17090a8c0e00b00262fbb08737mr2385640pjo.33.1690565722646; Fri, 28 Jul 2023 10:35:22 -0700 (PDT) Received: from stoup.. ([2602:ae:154e:c001:cfba:2f6a:7070:67a9]) by smtp.gmail.com with ESMTPSA id co4-20020a17090afe8400b00267e299f71dsm2821211pjb.7.2023.07.28.10.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 10:35:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, npiggin@gmail.com, groug@kaod.org, david@gibson.dropbear.id.au, clg@kaod.org Subject: [PATCH] target/ppc: Disable goto_tb with architectural singlestep Date: Fri, 28 Jul 2023 10:35:20 -0700 Message-Id: <20230728173520.486025-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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=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 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 Signed-off-by: Richard Henderson Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé --- 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); }