From 6042c47cddae04d0c1f0c750968f66a553611f40 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Thu, 16 Jan 2025 18:45:41 +0100 Subject: cpus: Keep default fields initialization in cpu_common_initfn() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cpu_common_initfn() is our target agnostic initializer, while cpu_exec_initfn() is the target specific one. The %as and %num_ases fields are not target specific, so initialize them in the common helper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-6-philmd@linaro.org> --- hw/core/cpu-common.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/core/cpu-common.c') diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index ff605059c1..71425cb742 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -244,6 +244,8 @@ static void cpu_common_initfn(Object *obj) gdb_init_cpu(cpu); cpu->cpu_index = UNASSIGNED_CPU_INDEX; cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX; + cpu->as = NULL; + cpu->num_ases = 0; /* user-mode doesn't have configurable SMP topology */ /* the default value is changed by qemu_init_vcpu() for system-mode */ cpu->nr_threads = 1; -- cgit 1.4.1