cpu-target: don't set cpu->thread_id to bogus value
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 30 May 2024 19:42:48 +0000 (20:42 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 4 Jun 2024 08:02:39 +0000 (10:02 +0200)
The thread_id isn't valid until the threads are created. There is no
point setting it here. The only thing that cares about the thread_id
is qmp_query_cpus_fast.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20240530194250.1801701-4-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
cpu-target.c

index 5af120e8aa1dadb6041baed4c3fce179df6b1c1c..499facf7747fe5fc69a1a76b9b44781849251baa 100644 (file)
@@ -241,7 +241,6 @@ void cpu_exec_initfn(CPUState *cpu)
     cpu->num_ases = 0;
 
 #ifndef CONFIG_USER_ONLY
-    cpu->thread_id = qemu_get_thread_id();
     cpu->memory = get_system_memory();
     object_ref(OBJECT(cpu->memory));
 #endif