qemu/target
David Hildenbrand a30fb811cb s390x: refactor reset/reipl handling
Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might
not be the best idea. As pause_all_vcpus() temporarily drops the qemu
mutex, two parallel calls to pause_all_vcpus() can be active at a time,
resulting in a deadlock. (either by two VCPUs or by the main thread and a
VCPU)

Let's handle it via the main loop instead, as suggested by Paolo. If we
would have two parallel reset requests by two different VCPUs at the
same time, the last one would win.

We use the existing ipl device to handle it. The nice side effect is
that we can get rid of reipl_requested.

This change implies that all reset handling now goes via the common
path, so "no-reboot" handling is now active for all kinds of reboots.

Let's execute any CPU initialization code on the target CPU using
run_on_cpu.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180424101859.10239-1-david@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-05-14 17:10:02 +02:00
..
alpha translator: merge max_insns into DisasContextBase 2018-05-09 10:12:21 -07:00
arm target-arm queue: 2018-05-11 17:41:54 +01:00
cris * Don't silently truncate extremely long words in the command line 2018-05-14 09:55:09 +01:00
hppa translator: merge max_insns into DisasContextBase 2018-05-09 10:12:21 -07:00
i386 * Don't silently truncate extremely long words in the command line 2018-05-14 09:55:09 +01:00
lm32 target/lm32: avoid integer overflow in next_page PC check 2018-05-09 10:12:21 -07:00
m68k target/m68k: Fix build Werror with gcc 8.0.1 2018-05-11 11:12:02 +01:00
microblaze target/microblaze: avoid integer overflow in next_page PC check 2018-05-09 10:12:21 -07:00
mips * Don't silently truncate extremely long words in the command line 2018-05-14 09:55:09 +01:00
moxie icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
nios2 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
openrisc target/openrisc: convert to TranslatorOps 2018-05-09 10:12:21 -07:00
ppc * Don't silently truncate extremely long words in the command line 2018-05-14 09:55:09 +01:00
riscv target-arm queue: 2018-05-11 17:41:54 +01:00
s390x s390x: refactor reset/reipl handling 2018-05-14 17:10:02 +02:00
sh4 target/sh4: convert to TranslatorOps 2018-05-09 10:12:21 -07:00
sparc target/sparc: convert to TranslatorOps 2018-05-09 10:12:21 -07:00
tilegx target/tilegx: avoid integer overflow in next_page PC check 2018-05-09 10:12:21 -07:00
tricore icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
unicore32 target/unicore32: avoid integer overflow in next_page PC check 2018-05-09 10:12:21 -07:00
xtensa target-arm queue: 2018-05-11 17:41:54 +01:00