From patchwork Sat Jul 10 15:31:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 472344 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1366571jao; Sat, 10 Jul 2021 08:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpNuQKI/EsBNGEaTSYhamzfkM5vsVDdDLgCaIQtzBWmRiWDE0iYfbgDwVfuoVa95RImg0N X-Received: by 2002:ad4:4e6a:: with SMTP id ec10mr3136545qvb.58.1625931634270; Sat, 10 Jul 2021 08:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625931634; cv=none; d=google.com; s=arc-20160816; b=x1J8YmwDwVR9DSAu7+lLmfmuy8+ACpxE7U9dAk49zpQlPWffdUzWU/yWThM0vCbP1u Iq7Jg+YrTJbIe+FCSzZcPAoBxFNY2pnc4JcbcT4XdwswwxuxqSK1Jq/AVSOrMqBwrDhs yiDQVIIQ6sec2GNGGkAM4PUxUwdlXf/Uu6WoxUaKz+ZEWBwvne7LIA5aZROg5t3VXmeC uhKbNWAD3DvrfBAp4gRYuQtQQaUAn7rH13M9Im0xjFvLdh0PRxgpxgyP5gddRbh4EkWP 4xyqe+EU84RYDRaS2/b1qLQVMlAZDadzeznW9czCmLIsNhx04EB13hJ4HiZCELzZ/7h4 vnGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=z7Ncc5FKGICE8G9HC6MS3YW5C1jF/+Zh1RQa1f4ley4=; b=Wgw+34Dezl9b8V+RoBybqTFopZAOd4Iqy05SJpvbORj2cBcAW2qwXn1zp9wzSHrh8Q 6o4/PDAjX6XGHn3if9rt5trqxvgWrxd/jtGhdo+K0CAtWDxqKE1yZNc5geMh+Gr0XGgy lfOc3/l525+rxQZIK/4g5HBF/JqK/jUmEFMNUHbZ1aq/NoQL39kIrJ6B1MUKtwRpSb6u BRbtSnJsZaRIiLm59hyorFTCfiUT/L6HW3GKPIIAKosUistC65Kk7SLnWvr5AxZSdMOS LU5rbsqfCYOsrn64p0C/jUz/r4+P+jzaD/zRX1G597Fl3fwSpJfbn0wN2QR3E4DELuN6 viUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RANhMiEC; 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 f1si8525566qvt.163.2021.07.10.08.40.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jul 2021 08:40:34 -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=RANhMiEC; 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]:42902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2F5l-0002oE-IN for patch@linaro.org; Sat, 10 Jul 2021 11:40:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2ExP-0005BX-LR for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:55 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:35838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2ExN-0002Gi-Vk for qemu-devel@nongnu.org; Sat, 10 Jul 2021 11:31:55 -0400 Received: by mail-pj1-x1029.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso10004605pjc.0 for ; Sat, 10 Jul 2021 08:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z7Ncc5FKGICE8G9HC6MS3YW5C1jF/+Zh1RQa1f4ley4=; b=RANhMiECF+dWk8ZxPygJ3eH8FcPHjhQs4bxuO0AIacN1f4Ob2fJhnJR2grxc3AU481 YZ73zCRUZFs77t9c3v4b1fUgjjEErmvsc/94aRoi6usnw8MAx5hVtnANz7lrAIiiq6Wr TqzHBFkqfSRkremeALMCusyS+pV/N/4vyZ2NouzMluzZzExLyAF6V5tOKugWYs+Ux5TW 0sCBG87oslx+cStwycTxkIBT5XJwbrNiOQiLuN+JPK5fI5l2ffJJDL4E6KwWavIztVRC uXwE0n/cJzbKcaxESVjb4reBFWiFzi8NI/06U8PSccT7zrPMdtktL7Dy98X59dnUC7dU ar6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z7Ncc5FKGICE8G9HC6MS3YW5C1jF/+Zh1RQa1f4ley4=; b=owO1HZ4Xnr9elArExQ08j3jMQDzGMGynC9X3xQXUBCtk5RBRPvao0lDxxRvZKvHOx6 kI277EjU8ccuNYT7KBGNmZtV6AYq0DqK22z+KEG1x6jWvV6o4nB+/RQ5TnqyXUz5eazW WgLdzOLEEHo5yOiS4l74umTOWl5Y/dH9dQjg7M/v6AqFr6LFSwtBy51ume86H16ws9+m 4UOLSozb0EmRRo/4+wRBUEkzvv6e1HCI4ejn5WX4StTfTDADsJLkbX+bncmtuvoavjp+ sv9L4txgURVjDBv9evcZpsNGvEvWouw3c4nIGJQNTcu96jAMo35MEPz+bY9KRscS57Gz 2WIQ== X-Gm-Message-State: AOAM533IqeOI2pBbcE4ROyecKxglH95CqFTkQfNLM5JKRi/M001VICKK NfgsnLWZq+VgFJSPQ/Tl7/I/uF8B3GlePQ== X-Received: by 2002:a17:90a:928c:: with SMTP id n12mr43274630pjo.30.1625931112705; Sat, 10 Jul 2021 08:31:52 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id u23sm11975374pgk.38.2021.07.10.08.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 08:31:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/41] target/arm: Use translator_use_goto_tb for aarch64 Date: Sat, 10 Jul 2021 08:31:13 -0700 Message-Id: <20210710153143.1320521-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210710153143.1320521-1-richard.henderson@linaro.org> References: <20210710153143.1320521-1-richard.henderson@linaro.org> 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"), and gdbstub singlestep is handled by the generic function. Drop the unused 'n' argument to use_goto_tb. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index a6dd9ec701..ca11a5fecd 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -385,35 +385,20 @@ static void gen_step_complete_exception(DisasContext *s) s->base.is_jmp = DISAS_NORETURN; } -static inline bool use_goto_tb(DisasContext *s, int n, uint64_t dest) +static inline bool use_goto_tb(DisasContext *s, uint64_t dest) { - /* No direct tb linking with singlestep (either QEMU's or the ARM - * debug architecture kind) or deterministic io - */ - if (s->base.singlestep_enabled || s->ss_active || - (tb_cflags(s->base.tb) & CF_LAST_IO)) { + if (s->ss_active) { return false; } - -#ifndef CONFIG_USER_ONLY - /* Only link tbs from inside the same guest page */ - if ((s->base.tb->pc & TARGET_PAGE_MASK) != (dest & TARGET_PAGE_MASK)) { - return false; - } -#endif - - return true; + return translator_use_goto_tb(&s->base, dest); } static inline void gen_goto_tb(DisasContext *s, int n, uint64_t dest) { - const TranslationBlock *tb; - - tb = s->base.tb; - if (use_goto_tb(s, n, dest)) { + if (use_goto_tb(s, dest)) { tcg_gen_goto_tb(n); gen_a64_set_pc_im(dest); - tcg_gen_exit_tb(tb, n); + tcg_gen_exit_tb(s->base.tb, n); s->base.is_jmp = DISAS_NORETURN; } else { gen_a64_set_pc_im(dest);