[PATCH 10/12] KVM: mark memory barrier with smp_mb__after_atomic

From: Paolo Bonzini
Date: Wed Feb 24 2016 - 08:18:20 EST


Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
virt/kvm/kvm_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 39c36d4f4f5c..77a73739b08e 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -171,7 +171,7 @@ bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req)
cpu = vcpu->cpu;

/* Set ->requests bit before we read ->mode */
- smp_mb();
+ smp_mb__after_atomic();

if (cpus != NULL && cpu != -1 && cpu != me &&
kvm_vcpu_exiting_guest_mode(vcpu) != OUTSIDE_GUEST_MODE)
--
1.8.3.1