diff options
author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2012-02-06 09:59:05 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-08 12:10:16 (GMT) |
commit | 24a13044a84be51a6a4885a72ac9d5f4ed0742d0 (patch) | |
tree | 7dcd606daff06c71b2eed197683d4ddd1b4235bc /arch/s390/kvm | |
parent | 151104a7b3a82f9c56d636595ae58084049d2559 (diff) | |
download | linux-24a13044a84be51a6a4885a72ac9d5f4ed0742d0.tar.xz |
KVM: s390: ignore sigp stop overinitiative
In __inject_sigp_stop() do nothing when the CPU is already in stopped
state.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/sigp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index c703b1c..f3d5cc2 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c @@ -160,12 +160,15 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action) inti->type = KVM_S390_SIGP_STOP; spin_lock_bh(&li->lock); + if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED)) + goto out; list_add_tail(&inti->list, &li->list); atomic_set(&li->active, 1); atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags); li->action_bits |= action; if (waitqueue_active(&li->wq)) wake_up_interruptible(&li->wq); +out: spin_unlock_bh(&li->lock); return 0; /* order accepted */ |