mirror of https://github.com/xemu-project/xemu.git
cpus: Fix CPU unplug for MTTCG
Ensure that the unplugged CPU thread is destroyed and the waiting thread is notified about it. This is needed for CPU unplug to work correctly in MTTCG mode. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
4771df23ed
commit
a3e53273ad
6
cpus.c
6
cpus.c
|
@ -1483,6 +1483,12 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
|
|||
/* Ignore everything else? */
|
||||
break;
|
||||
}
|
||||
} else if (cpu->unplug) {
|
||||
qemu_tcg_destroy_vcpu(cpu);
|
||||
cpu->created = false;
|
||||
qemu_cond_signal(&qemu_cpu_cond);
|
||||
qemu_mutex_unlock_iothread();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
atomic_mb_set(&cpu->exit_request, 0);
|
||||
|
|
Loading…
Reference in New Issue