Previous commit removed the restriction on completing the full QDev UNREALIZE step before removing vCPUs from global queue, it is now safe to call cpu_list_remove() after accel_cpu_common_unrealize(). Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> --- cpu-target.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 667688332c9..11592e2583f 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -172,12 +172,9 @@ void cpu_exec_unrealizefn(CPUState *cpu) } #endif - cpu_list_remove(cpu); - /* - * Now that the vCPU has been removed from the RCU list, we can call - * accel_cpu_common_unrealize, which may free fields using call_rcu. - */ accel_cpu_common_unrealize(cpu); + + cpu_list_remove(cpu); } /* -- 2.47.1