From patchwork Thu May 1 06:23:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 886307 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp174567wrq; Wed, 30 Apr 2025 23:27:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVOf0+COPNyovvmdn5IhqHaqPTw7iieqeW6mFe/cDm6qSpdI2R0gf54O5EFfKNUhlaQp+Fr2A==@linaro.org X-Google-Smtp-Source: AGHT+IHlB6DJn/fxI1gnXEIsDRHszZgEDCL+0wkO0+8vzOugrE65cyjlhbMG5h+LvagLipTQKMVV X-Received: by 2002:a05:620a:2682:b0:7c5:3c62:804c with SMTP id af79cd13be357-7cacef6440fmr139980985a.21.1746080849631; Wed, 30 Apr 2025 23:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746080849; cv=none; d=google.com; s=arc-20240605; b=MgQRfC3HbiTZK8gxjtQjrYLG4iD0IYkoq7r+M5t0qnUqE3cGrac1cot7J8tQ6p6dnV hmeztzpjPBP95bDtoTIKtRffn7uVHhnK0L572juvnk0WFO6X4jeM1f354odm9OkHD6JK iMPI7XS3P/ZhDJjt553RGDhJuToygYacPuPJnBkHlBg5ja4Q+cf+sooVXU1U8ELJRqyW Fy7rHMc8XqGg39BarLoRCr9vN9owinrzvTrLL/DJrH3NdhccES7IAxZpCEPkYpsRmiiB fr7/qfvbs8brJG+8WBo8zwHeI3PFvkZuOPtryOOQNNxa2c9rA+VCC1LMYpgrVu1JIHuQ DKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=iUi/Pm8PBuXUf0tGsedeIwPfTJbQS6s9US0oEnWDi/c=; fh=Fszn0PKjr1lTJ9agfldZI0BguDyTJI4MYSL4G/fcmsE=; b=Le4h64m4rnYRSfhYxosU1S/Ua5wCtbGVgINMEQ+ldcJVSN03fB5gw8C9FDYFpVnV8C rKmCz1QFU7eTm/SEzkWCneuzsa4oe8aq83FF7I8tRDlO4nd8AtQQ6/13asF5uVi2+1IF iQCveWXCJWEHSSAlvFe9Zzj4Rur9G/5q5ZintUy+0+dREtNc+/A01jg+e0yyhZBRN/9G Rel29nLtMU/xLjK0gpQQ9XIysyUdXeMOHV1Lsx6hcr/OW1Mrg+qLUQ3SDjdZN1rIHj7u mz1qXuUxpgxai2Nlc6DGtmYzYd3q35wfZHFI3+CchWGebHITTDke6OCm1wsnQZMEj6L7 GO0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cvVWlPV+; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cad23c9604si6739085a.141.2025.04.30.23.27.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Apr 2025 23:27:29 -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=cvVWlPV+; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uANLZ-0005Qv-9b; Thu, 01 May 2025 02:24:37 -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 1uANL3-0005BR-BI for qemu-devel@nongnu.org; Thu, 01 May 2025 02:24:08 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uANL1-00075d-Dl for qemu-devel@nongnu.org; Thu, 01 May 2025 02:24:04 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736aaeed234so664449b3a.0 for ; Wed, 30 Apr 2025 23:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746080640; x=1746685440; 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=iUi/Pm8PBuXUf0tGsedeIwPfTJbQS6s9US0oEnWDi/c=; b=cvVWlPV+l9P3DpYf/mC0gJfckXzIi8oExGdnY8y4NgqTFoCF7kPMnX7jfINWbHXN4X Wo7QP//Q0SpJQF7IpFLaWK+gaDDjLguOH67lZOTVoisOLFq5qvOrdw9n61Hu5qhwU3ZS kPO7O7WgJSMZg/bG0Jpp7c2TANE7jwY+WwXMKC1rfq8SXUC9FI7izo4Fgq0L9z3cHu4y LPVNOG0YGYYD1Da6McMMXPVfK3I5zdlXM5VoHFJXOyqD2viqFsVa7DAiamK4YFpwUV2g YXeDF9jVKi1y33hjkpXK1LoR3j1lvmCZJycd95fRVlYqGkUcO500vSLl7fLN2wyPe/ZF DNQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746080640; x=1746685440; 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=iUi/Pm8PBuXUf0tGsedeIwPfTJbQS6s9US0oEnWDi/c=; b=QoHPTgRy30xRRmO0yIft3O2ZnMwVcHWDODhPGJKzcfo/CURcncFSudmAtS9jOfOYHA sTTmRN1IG1APS94C4lUXR+XQpC5Hyvfrdem2ylBYIBlpH7gUoDAJv8l07qkp1aFPWhxl 3DipoE7YEEDwfNs1rEp92mFgg7beFC5CfxQt6d9AHfUvCgDNWQMRePUpS1XGhua4RhzU YoDm+rDWNYIX/8Ys13saLl36nQlDyBScfQPbCfk2NjsWyPTKvrade4dGcYJTuSITCoZ6 OXzVvIHOcgWsmXVMaVsb8PgFCkbgELOdM3mgg8TzXrcCqBPBs/+eE4P1TszQl7rdOXCP vHfQ== X-Gm-Message-State: AOJu0YyjHYLt0N7K7fQ7injgxZloNfLtwHnzx43OsCxDKDdN/sZsAYJD RLuZoBXTSzVG2D0pz6uoH3zQ+U77I6yhv05YUM3q/dSO4LwxWkZTqWF//0PdlMPkiWEWRxxbDLt a X-Gm-Gg: ASbGncup1nANhYqDDH5sEiTEUNGbNP2HzarBc5EqRr0ceS11/BfQv+8aleCxpOVIg5G UQVhHdPfvsUBFT2lrvkxA0w6IDyWyC/E7ZNBY9BrtusItyfNOH2rN3/SHJ0aYea4PM0wYGvEpln mYInkLbj4ahDYBp3HDbjEtDUS/jZMdTc/jtIhreVBexSPdXU5FMOnB7kER6f3PdpRKFdtWNVn96 1yf8jxTjrXNrqP0+zoct0ya7fE6G/gv93hPMDNyMR0n1jyJRYM6dsMHhlNx/HUhP06wq9Hm59mQ LfrITKX4zGTG2CYyiRQhlJ9Q4q2WPciLY7nT0pT+ X-Received: by 2002:a05:6a20:3942:b0:1f5:7007:9eb8 with SMTP id adf61e73a8af0-20bd6a55a1fmr1761624637.16.1746080640303; Wed, 30 Apr 2025 23:24:00 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7404f9fed21sm108134b3a.93.2025.04.30.23.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Apr 2025 23:23:59 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, richard.henderson@linaro.org, alex.bennee@linaro.org, Paolo Bonzini , anjo@rev.ng, =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , kvm@vger.kernel.org, Pierrick Bouvier Subject: [PATCH v3 10/33] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features Date: Wed, 30 Apr 2025 23:23:21 -0700 Message-ID: <20250501062344.2526061-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250501062344.2526061-1-pierrick.bouvier@linaro.org> References: <20250501062344.2526061-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42b.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=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 Need to stub cpu64 finalize functions. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 2 -- target/arm/cpu32-stubs.c | 26 ++++++++++++++++++++++++++ target/arm/meson.build | 11 +++++++---- 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 target/arm/cpu32-stubs.c diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 00ae2778058..c3a1e8e284d 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1878,7 +1878,6 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp) { Error *local_err = NULL; -#ifdef TARGET_AARCH64 if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { arm_cpu_sve_finalize(cpu, &local_err); if (local_err != NULL) { @@ -1914,7 +1913,6 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp) return; } } -#endif if (kvm_enabled()) { kvm_arm_steal_time_finalize(cpu, &local_err); diff --git a/target/arm/cpu32-stubs.c b/target/arm/cpu32-stubs.c new file mode 100644 index 00000000000..81be44d8462 --- /dev/null +++ b/target/arm/cpu32-stubs.c @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "target/arm/cpu.h" +#include "target/arm/internals.h" +#include + +void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} + +void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} + +void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} + +void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} diff --git a/target/arm/meson.build b/target/arm/meson.build index 3065081d241..c39ddc4427b 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -11,10 +11,13 @@ arm_ss.add(zlib) arm_ss.add(when: 'CONFIG_KVM', if_true: files('hyp_gdbstub.c', 'kvm.c'), if_false: files('kvm-stub.c')) arm_ss.add(when: 'CONFIG_HVF', if_true: files('hyp_gdbstub.c')) -arm_ss.add(when: 'TARGET_AARCH64', if_true: files( - 'cpu64.c', - 'gdbstub64.c', -)) +arm_ss.add(when: 'TARGET_AARCH64', + if_true: files( + 'cpu64.c', + 'gdbstub64.c'), + if_false: files( + 'cpu32-stubs.c'), +) arm_system_ss = ss.source_set() arm_system_ss.add(files(