]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: properly "unrealize" vCPU object
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 20 May 2020 14:05:39 +0000 (15:05 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 27 May 2020 13:26:49 +0000 (14:26 +0100)
commit1f81ce90e31ef338ee53a0cea02344237bc470cc
tree2931e6981e6e6c3ec15c693e9efc5c92215eaa95
parent716386e397fabbbf9915d49f8bc79673fd2831bb
linux-user: properly "unrealize" vCPU object

We shouldn't be messing around with the CPU list in linux-user save
for the very special case of do_fork(). When threads end we need to
properly follow QOM object lifetime handling and allow the eventual
cpu_common_unrealizefn to both remove the CPU and ensure any clean-up
actions are taken place, for example calling plugin exit hooks.

There is still a race condition to avoid so use the linux-user
specific clone_lock instead of the cpu_list_lock to avoid it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Nikolay Igotti <igotti@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200520140541.30256-14-alex.bennee@linaro.org>
linux-user/syscall.c