Commit 9185124e authored by Jens Freimann's avatar Jens Freimann Committed by Christian Borntraeger

KVM: s390: use atomic bitops to access pending_irqs bitmap

Currently we use a mixture of atomic/non-atomic bitops
and the local_int spin lock to protect the pending_irqs bitmap
and interrupt payload data.

We need to use atomic bitops for the pending_irqs bitmap everywhere
and in addition acquire the local_int lock where interrupt data needs
to be protected.
Signed-off-by: default avatarJens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 467fc298
......@@ -929,7 +929,7 @@ static int __inject_prog(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
li->irq.pgm = irq->u.pgm;
__set_bit(IRQ_PEND_PROG, &li->pending_irqs);
set_bit(IRQ_PEND_PROG, &li->pending_irqs);
return 0;
}
......@@ -995,7 +995,7 @@ int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
irq->u.extcall.code, 0, 2);
*extcall = irq->u.extcall;
__set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs);
set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs);
atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment