From patchwork Tue Mar 19 15:42:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1913686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PrWe3goK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tzbmh2LHXz1yWn for ; Wed, 20 Mar 2024 02:51:16 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbf7-0003Y3-FX; Tue, 19 Mar 2024 11:46:01 -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 1rmben-0001uK-7q for qemu-ppc@nongnu.org; Tue, 19 Mar 2024 11:45:41 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmbel-0005th-Ig for qemu-ppc@nongnu.org; Tue, 19 Mar 2024 11:45:40 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4146566659bso6054685e9.3 for ; Tue, 19 Mar 2024 08:45:36 -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=bpfwSoO6W5G+gC4ocsMYeqrELYDIOUkE6QqHGxcJ4yVGgI/KebCdeZpYpUO61+ChQt euCnZBdbFyk/Xyvm5WdHBPZv4yC8jcoTH50vPkdpeuCCOP5n7Gly+i8zGf3d0j/uhl3z I44L3vSoa6Kb9YXvVsaOWBT1iiJwndwuMLmzPRUnCdKp3bz2HLM3ak9CxzVjdAIbGZpS QA2QfF9kTQv6XDV9HP+z0y44pAhtKeSJSsh5tjTE2ddBKHPmaVoMhGf7qMz7wHCPgANq g6KqHkTlN5/w1hrkLeqjfm9V3ghjo5o1+q8wGwIuEFA5IKgm5DB7sCSyrBFhH7DZtnXN rV3g== X-Forwarded-Encrypted: i=1; AJvYcCWVwYtA8NdeluDb87/gXpOE36Xpn6a8eu0f0fnhrLxVUHiBGBVKEGgz4gWixmAe9C5MGSWl/1HguKKu5wwrYpnbDT9v X-Gm-Message-State: AOJu0YwzXPC3ADIfG8+Xda4ja2ZDcJJAxW3HGNjCdx5dM0GAh0QVr/zx 0IxsJTrNj8yTBt5Xe6FjA/IIkCyUgNTGMhxVjO+2dYSqnxI4dW6FaFw9P9WlzGc= X-Google-Smtp-Source: AGHT+IEE4yAInbM7a5W3co3gyripCxkhU6CS1CSdcy5xzdaio7+Ja0646bI9EzwANQCxpaRYANfjeA== 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_Mathieu-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_Mathieu-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 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {