summaryrefslogtreecommitdiffstats
path: root/cpus.c
diff options
context:
space:
mode:
authorChristian Borntraeger2016-09-19 13:39:42 +0200
committerChristian Borntraeger2016-09-28 13:24:51 +0200
commitf9530c32420fff941b7bc8bb5d90310eecab5a96 (patch)
tree71dfffe8cad14ba939ea04632e5e29fda4c2a2e0 /cpus.c
parents390x/pci: code cleanup (diff)
downloadqemu-f9530c32420fff941b7bc8bb5d90310eecab5a96.tar.gz
qemu-f9530c32420fff941b7bc8bb5d90310eecab5a96.tar.xz
qemu-f9530c32420fff941b7bc8bb5d90310eecab5a96.zip
s390x/kvm: Fix potential deadlock in sigp handling
If two VCPUs exit at the same time and target each other with a sigp, both could run into a deadlock as run_on_cpu on CPU0 will free the BQL when starting the CPU1 target routine. CPU1 will run its sigp initiater for CPU0 before handling the run_on_cpu requests, thus resulting in a dead lock. As all qemu SIGPs are slow path anway we can use a big sigp lock and allow only one SIGP for the guest at a time. We will return condition code 2 (BUSY) on contention to the guest. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'cpus.c')
0 files changed, 0 insertions, 0 deletions