diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2014-04-17 09:06:12 (GMT) |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2014-04-23 20:49:48 (GMT) |
commit | a086f6a1ebc9d8d2d028b99e779ce0dbd9691dea (patch) | |
tree | de33d7b00d27226d7b775dd038875f12d55c6e0a /virt/kvm/kvm_main.c | |
parent | 42bf549f3c672006ba18e97152cbc563315ba4e6 (diff) | |
download | linux-a086f6a1ebc9d8d2d028b99e779ce0dbd9691dea.tar.xz |
Revert "KVM: Simplify kvm->tlbs_dirty handling"
This reverts commit 5befdc385ddb2d5ae8995ad89004529a3acf58fc.
Since we will allow flush tlb out of mmu-lock in the later
patch
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ea46d64..fa70c6e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -186,9 +186,12 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) void kvm_flush_remote_tlbs(struct kvm *kvm) { + long dirty_count = kvm->tlbs_dirty; + + smp_mb(); if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) ++kvm->stat.remote_tlb_flush; - kvm->tlbs_dirty = false; + cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); } EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); |