Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: Remove tlbs_dirty

There is no user of tlbs_dirty.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210918005636.3675-4-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Lai Jiangshan and committed by
Paolo Bonzini
6bc6db00 65855ed8

+2 -9
-1
include/linux/kvm_host.h
··· 608 608 unsigned long mmu_notifier_range_start; 609 609 unsigned long mmu_notifier_range_end; 610 610 #endif 611 - long tlbs_dirty; 612 611 struct list_head devices; 613 612 u64 manual_dirty_log_protect; 614 613 struct dentry *debugfs_dentry;
+2 -8
virt/kvm/kvm_main.c
··· 326 326 #ifndef CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL 327 327 void kvm_flush_remote_tlbs(struct kvm *kvm) 328 328 { 329 - /* 330 - * Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in 331 - * kvm_make_all_cpus_request. 332 - */ 333 - long dirty_count = smp_load_acquire(&kvm->tlbs_dirty); 334 - 335 329 ++kvm->stat.generic.remote_tlb_flush_requests; 330 + 336 331 /* 337 332 * We want to publish modifications to the page tables before reading 338 333 * mode. Pairs with a memory barrier in arch-specific code. ··· 342 347 if (!kvm_arch_flush_remote_tlb(kvm) 343 348 || kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) 344 349 ++kvm->stat.generic.remote_tlb_flush; 345 - cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); 346 350 } 347 351 EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); 348 352 #endif ··· 546 552 } 547 553 } 548 554 549 - if (range->flush_on_ret && (ret || kvm->tlbs_dirty)) 555 + if (range->flush_on_ret && ret) 550 556 kvm_flush_remote_tlbs(kvm); 551 557 552 558 if (locked)