linux/arch/s390/kvm
Christian Borntraeger 72e1ad4200 KVM: s390: document memory ordering for kvm_s390_vcpu_wakeup
swait_active does not enforce any ordering and it can therefore trigger
some subtle races when the CPU moves the read for the check before a
previous store and that store is then used on another CPU that is
preparing the swait.

On s390 there is a call to swait_active in kvm_s390_vcpu_wakeup. The
good thing is, on s390 all potential races cannot happen because all
callers of kvm_s390_vcpu_wakeup do not store (no race) or use an atomic
operation, which handles memory ordering. Since this is not guaranteed
by the Linux semantics (but by the implementation on s390) let's add
smp_mb_after_atomic to make this obvious and document the ordering.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2017-11-09 09:35:06 +01:00
..
diag.c First batch of KVM changes for 4.14 2017-09-08 15:18:36 -07:00
gaccess.c KVM: s390: use new mm defines instead of magic values 2017-07-26 08:25:10 +02:00
gaccess.h s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
guestdbg.c KVM: s390: guestdbg: fix range check 2017-08-31 13:49:39 +02:00
intercept.c s390/sthyi: add cache to store hypervisor info 2017-10-09 11:15:35 +02:00
interrupt.c KVM: s390: document memory ordering for kvm_s390_vcpu_wakeup 2017-11-09 09:35:06 +01:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
Kconfig KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
kvm-s390.c s390/sthyi: add cache to store hypervisor info 2017-10-09 11:15:35 +02:00
kvm-s390.h s390/sthyi: reorganize sthyi implementation 2017-10-09 11:15:33 +02:00
Makefile s390/sthyi: reorganize sthyi implementation 2017-10-09 11:15:33 +02:00
priv.c First batch of KVM changes for 4.14 2017-09-08 15:18:36 -07:00
sigp.c KVM: s390: Support Configuration z/Architecture Mode 2017-08-28 16:25:13 +02:00
trace-s390.h KVM: s390: introduce adapter interrupt inject function 2017-04-06 13:15:37 +02:00
trace.h KVM: s390: trace and count all skey intercepts 2016-06-10 12:07:31 +02:00
vsie.c First batch of KVM changes for 4.14 2017-09-08 15:18:36 -07:00