diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2014-04-17 05:06:12 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2014-04-23 16:49:48 -0400 |
commit | a086f6a1ebc9d8d2d028b99e779ce0dbd9691dea (patch) | |
tree | de33d7b00d27226d7b775dd038875f12d55c6e0a /virt | |
parent | 42bf549f3c672006ba18e97152cbc563315ba4e6 (diff) |
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')
-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 ea46d64c8e75..fa70c6e642b4 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) | |||
186 | 186 | ||
187 | void kvm_flush_remote_tlbs(struct kvm *kvm) | 187 | void kvm_flush_remote_tlbs(struct kvm *kvm) |
188 | { | 188 | { |
189 | long dirty_count = kvm->tlbs_dirty; | ||
190 | |||
191 | smp_mb(); | ||
189 | if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) | 192 | if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) |
190 | ++kvm->stat.remote_tlb_flush; | 193 | ++kvm->stat.remote_tlb_flush; |
191 | kvm->tlbs_dirty = false; | 194 | cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); |
192 | } | 195 | } |
193 | EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); | 196 | EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); |
194 | 197 | ||