KVM: add missing memory barrier in kvm_{make,check}_request
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Mar 2016 15:30:22 +0000 (16:30 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 20 Apr 2016 13:29:17 +0000 (15:29 +0200)
commit2e4682ba2ed79d8082b78d292b3b80f54d970b7a
tree8e5b5b046d1e680516b2491275cfb1df9d14d2ab
parent46971a2f59f135341f8912f516540fef6890d4df
KVM: add missing memory barrier in kvm_{make,check}_request

kvm_make_request and kvm_check_request imply a producer-consumer
relationship; add implicit memory barriers to them.  There was indeed
already a place that was adding an explicit smp_mb() to order between
kvm_check_request and the processing of the request.  That memory
barrier can be removed (as an added benefit, kvm_check_request can use
smp_mb__after_atomic which is free on x86).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/irq_comm.c
include/linux/kvm_host.h