Merge branch 'mm-delete-change-gpte' into HEAD
The .change_pte() MMU notifier callback was intended as an optimization and for this reason it was initially called without a surrounding mmu_notifier_invalidate_range_{start,end}() pair. It was only ever implemented by KVM (which was also the original user of MMU notifiers) and the rules on when to call set_pte_at_notify() rather than set_pte_at() have always been pretty obscure. It may seem a miracle that it has never caused any hard to trigger bugs, but there's a good reason for that: KVM's implementation has been nonfunctional for a good part of its existence. Already in 2012, commit 6bdb913f ("mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end", 2012-10-09) changed the .change_pte() callback to occur within an invalidate_range_start/end() pair; and because KVM unmaps the sPTEs during .invalidate_range_start(), .change_pte() has no hope of finding a sPTE to change. Therefore, all the code for .change_pte() can be removed from both KVM and mm/, and set_pte_at_notify() can be replaced with just set_pte_at(). Signed-off-by:Paolo Bonzini <pbonzini@redhat.com>
Showing
- arch/arm64/kvm/mmu.c 0 additions, 34 deletionsarch/arm64/kvm/mmu.c
- arch/loongarch/include/asm/kvm_host.h 0 additions, 1 deletionarch/loongarch/include/asm/kvm_host.h
- arch/loongarch/kvm/mmu.c 0 additions, 32 deletionsarch/loongarch/kvm/mmu.c
- arch/mips/kvm/mmu.c 0 additions, 30 deletionsarch/mips/kvm/mmu.c
- arch/powerpc/include/asm/kvm_ppc.h 0 additions, 1 deletionarch/powerpc/include/asm/kvm_ppc.h
- arch/powerpc/kvm/book3s.c 0 additions, 5 deletionsarch/powerpc/kvm/book3s.c
- arch/powerpc/kvm/book3s.h 0 additions, 1 deletionarch/powerpc/kvm/book3s.h
- arch/powerpc/kvm/book3s_64_mmu_hv.c 0 additions, 12 deletionsarch/powerpc/kvm/book3s_64_mmu_hv.c
- arch/powerpc/kvm/book3s_hv.c 0 additions, 1 deletionarch/powerpc/kvm/book3s_hv.c
- arch/powerpc/kvm/book3s_pr.c 0 additions, 7 deletionsarch/powerpc/kvm/book3s_pr.c
- arch/powerpc/kvm/e500_mmu_host.c 0 additions, 6 deletionsarch/powerpc/kvm/e500_mmu_host.c
- arch/riscv/kvm/mmu.c 0 additions, 20 deletionsarch/riscv/kvm/mmu.c
- arch/x86/kvm/mmu/mmu.c 7 additions, 60 deletionsarch/x86/kvm/mmu/mmu.c
- arch/x86/kvm/mmu/spte.c 0 additions, 16 deletionsarch/x86/kvm/mmu/spte.c
- arch/x86/kvm/mmu/spte.h 0 additions, 2 deletionsarch/x86/kvm/mmu/spte.h
- arch/x86/kvm/mmu/tdp_mmu.c 0 additions, 46 deletionsarch/x86/kvm/mmu/tdp_mmu.c
- arch/x86/kvm/mmu/tdp_mmu.h 0 additions, 1 deletionarch/x86/kvm/mmu/tdp_mmu.h
- include/linux/kvm_host.h 0 additions, 2 deletionsinclude/linux/kvm_host.h
- include/linux/mmu_notifier.h 0 additions, 44 deletionsinclude/linux/mmu_notifier.h
- include/trace/events/kvm.h 0 additions, 15 deletionsinclude/trace/events/kvm.h
Please register or sign in to comment