KVM: Replace smp_mb() with smp_mb_after_atomic() in the kvm_make_all_cpus_request()

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Lan Tianyu 2016-03-13 11:10:26 +08:00 committed by Paolo Bonzini
parent 36ca7e0a57
commit a30a050916
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req)
kvm_make_request(req, vcpu);
cpu = vcpu->cpu;
/* Set ->requests bit before we read ->mode */
smp_mb();
/* Set ->requests bit before we read ->mode. */
smp_mb__after_atomic();
if (cpus != NULL && cpu != -1 && cpu != me &&
kvm_vcpu_exiting_guest_mode(vcpu) != OUTSIDE_GUEST_MODE)