[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 11/48] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finali
From: |
Pierrick Bouvier |
Subject: |
[PATCH v5 11/48] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features |
Date: |
Sun, 4 May 2025 18:51:46 -0700 |
Need to stub cpu64 finalize functions.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
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 <glib.h>
+
+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(
--
2.47.2
- [PATCH v5 02/48] include/system/hvf: missing vaddr include, (continued)
- [PATCH v5 02/48] include/system/hvf: missing vaddr include, Pierrick Bouvier, 2025/05/04
- [PATCH v5 03/48] meson: add common libs for target and target_system, Pierrick Bouvier, 2025/05/04
- [PATCH v5 04/48] meson: apply target config for picking files from libsystem and libuser, Pierrick Bouvier, 2025/05/04
- [PATCH v5 05/48] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h, Pierrick Bouvier, 2025/05/04
- [PATCH v5 10/48] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common, Pierrick Bouvier, 2025/05/04
- [PATCH v5 06/48] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub, Pierrick Bouvier, 2025/05/04
- [PATCH v5 08/48] accel/hvf: add hvf_enabled() for common code, Pierrick Bouvier, 2025/05/04
- [PATCH v5 09/48] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency, Pierrick Bouvier, 2025/05/04
- [PATCH v5 11/48] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features,
Pierrick Bouvier <=
- [PATCH v5 07/48] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c, Pierrick Bouvier, 2025/05/04
- [PATCH v5 13/48] target/arm/cpu32-stubs.c: compile file twice (user, system), Pierrick Bouvier, 2025/05/04
- [PATCH v5 16/48] target/arm/helper: use vaddr instead of target_ulong for probe_access, Pierrick Bouvier, 2025/05/04
- [PATCH v5 15/48] target/arm/helper: use vaddr instead of target_ulong for exception_pc_alignment, Pierrick Bouvier, 2025/05/04
- [PATCH v5 14/48] tcg: add vaddr type for helpers, Pierrick Bouvier, 2025/05/04
- [PATCH v5 19/48] target/arm/debug_helper: remove target_ulong, Pierrick Bouvier, 2025/05/04
- [PATCH v5 18/48] target/arm/debug_helper: only include common helpers, Pierrick Bouvier, 2025/05/04
- [PATCH v5 12/48] target/arm/cpu: compile file twice (user, system) only, Pierrick Bouvier, 2025/05/04