aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 64be836f3348..9f32bffd37c0 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -357,11 +357,11 @@ static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn,
357 * been freed. 357 * been freed.
358 */ 358 */
359 kvm->mmu_notifier_seq++; 359 kvm->mmu_notifier_seq++;
360 smp_wmb();
360 /* 361 /*
361 * The above sequence increase must be visible before the 362 * The above sequence increase must be visible before the
362 * below count decrease but both values are read by the kvm 363 * below count decrease, which is ensured by the smp_wmb above
363 * page fault under mmu_lock spinlock so we don't need to add 364 * in conjunction with the smp_rmb in mmu_notifier_retry().
364 * a smb_wmb() here in between the two.
365 */ 365 */
366 kvm->mmu_notifier_count--; 366 kvm->mmu_notifier_count--;
367 spin_unlock(&kvm->mmu_lock); 367 spin_unlock(&kvm->mmu_lock);