diff options
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index fd67bcde998..19209f849cf 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -171,7 +171,12 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) | |||
171 | if (kvm_make_check_request(req, vcpu)) | 171 | if (kvm_make_check_request(req, vcpu)) |
172 | continue; | 172 | continue; |
173 | cpu = vcpu->cpu; | 173 | cpu = vcpu->cpu; |
174 | if (cpus != NULL && cpu != -1 && cpu != me) | 174 | |
175 | /* Set ->requests bit before we read ->mode */ | ||
176 | smp_mb(); | ||
177 | |||
178 | if (cpus != NULL && cpu != -1 && cpu != me && | ||
179 | kvm_vcpu_exiting_guest_mode(vcpu) != OUTSIDE_GUEST_MODE) | ||
175 | cpumask_set_cpu(cpu, cpus); | 180 | cpumask_set_cpu(cpu, cpus); |
176 | } | 181 | } |
177 | if (unlikely(cpus == NULL)) | 182 | if (unlikely(cpus == NULL)) |