aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorJens Freimann <jfrei@linux.vnet.ibm.com>2014-12-01 10:43:40 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-12-04 10:38:57 -0500
commit9185124e8754e54f3ae03ef3b3eab628aa066ef6 (patch)
tree5bbe75e2fd8cdf5972de88d1a9ec5ae62811c477 /arch/s390
parent467fc29892b8d563592d17d7128296495b6cf335 (diff)
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: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/interrupt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 6c0d14b5fec5..86bc89a2c6e6 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -929,7 +929,7 @@ static int __inject_prog(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
929 struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; 929 struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
930 930
931 li->irq.pgm = irq->u.pgm; 931 li->irq.pgm = irq->u.pgm;
932 __set_bit(IRQ_PEND_PROG, &li->pending_irqs); 932 set_bit(IRQ_PEND_PROG, &li->pending_irqs);
933 return 0; 933 return 0;
934} 934}
935 935
@@ -995,7 +995,7 @@ int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
995 irq->u.extcall.code, 0, 2); 995 irq->u.extcall.code, 0, 2);
996 996
997 *extcall = irq->u.extcall; 997 *extcall = irq->u.extcall;
998 __set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs); 998 set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs);
999 atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags); 999 atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags);
1000 return 0; 1000 return 0;
1001} 1001}