diff options
author | David Hildenbrand <david@redhat.com> | 2018-04-24 12:18:59 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2018-05-14 17:10:02 +0200 |
commit | a30fb811cbe940020a498d2cdac9326cac38b4d9 (patch) | |
tree | f4284495670fe38f7923834ce42012bc56c35e9c /target/s390x/internal.h | |
parent | 838fb84f83c84f00d15b1bede5e080b495644458 (diff) |
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>
Diffstat (limited to 'target/s390x/internal.h')
-rw-r--r-- | target/s390x/internal.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/target/s390x/internal.h b/target/s390x/internal.h index d911e84958..e392a02d12 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -273,12 +273,6 @@ static inline hwaddr decode_basedisp_s(CPUS390XState *env, uint32_t ipb, /* Base/displacement are at the same locations. */ #define decode_basedisp_rs decode_basedisp_s -static inline void s390_do_cpu_full_reset(CPUState *cs, run_on_cpu_data arg) -{ - cpu_reset(cs); -} - - /* arch_dump.c */ int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, void *opaque); |