Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24a13044 authored by Jens Freimann's avatar Jens Freimann Committed by Avi Kivity
Browse files

KVM: s390: ignore sigp stop overinitiative



In __inject_sigp_stop() do nothing when the CPU is already in stopped
state.

Signed-off-by: default avatarJens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 151104a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -160,12 +160,15 @@ static int __inject_sigp_stop(struct kvm_s390_local_interrupt *li, int action)
	inti->type = KVM_S390_SIGP_STOP;
	inti->type = KVM_S390_SIGP_STOP;


	spin_lock_bh(&li->lock);
	spin_lock_bh(&li->lock);
	if ((atomic_read(li->cpuflags) & CPUSTAT_STOPPED))
		goto out;
	list_add_tail(&inti->list, &li->list);
	list_add_tail(&inti->list, &li->list);
	atomic_set(&li->active, 1);
	atomic_set(&li->active, 1);
	atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);
	atomic_set_mask(CPUSTAT_STOP_INT, li->cpuflags);
	li->action_bits |= action;
	li->action_bits |= action;
	if (waitqueue_active(&li->wq))
	if (waitqueue_active(&li->wq))
		wake_up_interruptible(&li->wq);
		wake_up_interruptible(&li->wq);
out:
	spin_unlock_bh(&li->lock);
	spin_unlock_bh(&li->lock);


	return 0; /* order accepted */
	return 0; /* order accepted */