Received: by 2002:a17:906:aa04:b0:a46:bbde:2c08 with SMTP id ko4csp1384423ejb; Tue, 19 Mar 2024 08:47:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWU+fFwOO1qNko9vHyEsSOppFpZTFGj8uZX9XxCP/HRK74zMh7p61uEE/jPQaYOt8IX6Y1UwE55iN6WUTG58/ZE2DiD96MH X-Google-Smtp-Source: AGHT+IF6rVGWFT+qprRmxg4p3/FUFEwKJWJme5Z1bvXGhCmxo9FcvpFgKNXVmpm2A7813XX+vvh1 X-Received: by 2002:a05:620a:3902:b0:789:e7c6:8389 with SMTP id qr2-20020a05620a390200b00789e7c68389mr4407198qkn.3.1710863262331; Tue, 19 Mar 2024 08:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710863262; cv=none; d=google.com; s=arc-20160816; b=CY4lcr3CMwNkF1+QDf/VKxbIW04IE36qYxYlithUHeSzW48h+y5N0kGHkLRdNrkjMy v0bc5/ExdV2qieRySGNIbdwqqpeUHmJWLMO8g4y5frNCP6vLERiEFkUStXpbaS5ICZtd ck9uTxiqfNiMRvjralAei+F9sS+e1UGnwqutcinrfqtVau/ETzmYN4O45AyN5xLJBq3X FI+OYhPBQKDt6sRzPxY4zd3yGvBEVr37EKWkFk+yJI1xTkf1j5+/zLH2Lvp6IpQeuyS8 dpUYKOtm4AUo+yNrzyOqyxRd3ZxD2fC2L7kzYZ1Pey9KwaYNAnc89uKCEqUxUgNB0dwp Xzpg== 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=KePNgRmbU+28xR9UGCx3m+xL9JDUZJvD83MlZjBrjtE=; fh=NuPLMlVFc4cfvp2Oa5z7LIdyagRbnbQ6Uh9klhOYydE=; b=whcuujxRluyVVSRifPZmx73NN4hk9iAKnbI0YaZFkTa5Oz1AcoAiihOp2YRNBEnPDA 0XlI65qiW0V0Uh1tl5ujKwfJRgdQdHcCi+tVdlbEFqSyXQ6b/JK6RnJrIn/FBXoP6o5e q8LtHpmrcGGMDGPJSrBqn2J2kV2lah94afC+zZMg5STUfJTMLg7EsYdi3b3O5wwylVAu T/EZ3TiFWIXTks08btnaSb4MUlaP5E+JMC4RmDMzpjyE43+Qou3PYZwRSQQPHmX/LAyX 7C0xu3mz7j4c26ftCZDvwj89naT5GpGQljZTwPC5hOj0heFEi9fA46rFmVAcRaNyfqGv 43Fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PrWe3goK; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 oq27-20020a05620a611b00b007885be79107si11334246qkn.390.2024.03.19.08.47.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 08:47:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=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=PrWe3goK; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=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 1rmbf8-0003fL-K5; Tue, 19 Mar 2024 11:46:02 -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 1rmbeo-0001wb-2r for qemu-devel@nongnu.org; Tue, 19 Mar 2024 11:45:43 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmbel-0005ts-J6 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 11:45:41 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4146703fd2dso4786575e9.1 for ; Tue, 19 Mar 2024 08:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710863136; x=1711467936; darn=nongnu.org; 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=KePNgRmbU+28xR9UGCx3m+xL9JDUZJvD83MlZjBrjtE=; b=PrWe3goKr8GYfnaMoJ7LIs6DCUpeuT0k81FxkSXqMLUR8MzdMj+v1wkN+pWMm7kKkM wsckU+w+ehnecroXFmw7KzgzHNzEKh+QNPjYcc/8aONBFp+Tbx8J2IHVys814YfwReQv Qw3sBYbWMrvAWOoPnxdISp3SUCZvFWlRVJ3nIRlBC1/4SiZ4JGKAjRtnPcNiJ+esDwLj HiIqxbGJW/YLx6sA4sCN5jrFfMYKgpeFK5bHZfHh00f/U2/GfuGiLVFYlLGfkaBojIED lQxsdlko3tjajMo6db3Jzb8DxfaNa+T1p5kofw6NEzhYWUqYGKjgPKnhbg7a1B3rFbeo y+lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710863136; x=1711467936; 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=KePNgRmbU+28xR9UGCx3m+xL9JDUZJvD83MlZjBrjtE=; b=PPLwV81XXGu9JyUq/f13/caxIiCSVpUl+a4S8NNwWAgXO6427eumxRg158G9vq7JLt 9TSNzydtU3seBu5y1MeIogjEhwiu9qwYfKJrA12ZVdGeUYzzdGl3T+EN/LIbgi57zRn1 wsGfLm/GMCFDVLjVMlTG5bSnrBFSJAQfFupfibMqvcFT7zmzPLsQg2Hi6GOGtZn02RCQ DnRkI4XZ6aNcmFe8lZzNL68V0AkWaR1M+vkBrzvtfXweJ/Qgr8D7Rr9Pg5k2099QUDWf lR4a5Uc9B4OOmLAjXcESMcWos3XwGl/ELzwa9kb81QBYW5IkN+AFVDgIKhyfFX35rFkd nwxA== X-Gm-Message-State: AOJu0YzgjhAvVCQ48EEYEpJECmua/E21W/y+J+JQyhlsNbBrbqJ8jEDo iMYzdb38t82eLCWDyLW/WDWazzdByAOC16Efzl2klYORFD3jgN5+oRoum4pqrFl5V92m/dpnfdb 3 X-Received: by 2002:a1c:4b17:0:b0:414:3c57:fae5 with SMTP id y23-20020a1c4b17000000b004143c57fae5mr2383201wma.38.1710863135815; Tue, 19 Mar 2024 08:45:35 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id n20-20020a05600c501400b00414112a6159sm6723678wmr.44.2024.03.19.08.45.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 19 Mar 2024 08:45:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PATCH-for-9.1 27/27] accel/tcg: Remove check on TARGET_HAS_CPU_GET_TB_CPU_STATE Date: Tue, 19 Mar 2024 16:42:56 +0100 Message-ID: <20240319154258.71206-28-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319154258.71206-1-philmd@linaro.org> References: <20240319154258.71206-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: L5Zm96hOusx5 All targets have been converted to TCGCPUOps::get_cpu_state(), there is no more use of TARGET_HAS_CPU_GET_TB_CPU_STATE in the tree. Remove the check on TARGET_HAS_CPU_GET_TB_CPU_STATE, but add an assertion in tcg_exec_realizefn() so new target won't miss to implement this handler. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 1 + accel/tcg/translate-all.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 987e6164f7..6167bd3159 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1072,6 +1072,7 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; assert(tcg_ops->restore_state_to_opc); + assert(tcg_ops->get_cpu_state); tcg_ops->initialize(); tcg_target_initialized = true; } diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 7b538d2b9c..3c9fafba69 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -221,7 +221,6 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, cpu->cc->tcg_ops->restore_state_to_opc(cpu, tb, data); } -#ifndef TARGET_HAS_CPU_GET_TB_CPU_STATE void cpu_get_tb_cpu_state(CPUArchState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { @@ -229,7 +228,6 @@ void cpu_get_tb_cpu_state(CPUArchState *env, vaddr *pc, cpu->cc->tcg_ops->get_cpu_state(env, pc, cs_base, flags); } -#endif bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc) { -- 2.41.0