diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-11 13:06:24 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-12 04:41:14 -0400 |
commit | 531f5200243242d79e99751e4f8a16592afd121f (patch) | |
tree | b892d8ce293bd19e4fe634c2a305a5d041b5ac39 /lib/test_printf.c | |
parent | 9bc60f733839ab6fcdde0d0b15cbb486123e6402 (diff) | |
parent | f7842747d13d9f4eedba9edec5b834c9d9237717 (diff) |
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 6bdb913f0a70 ("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>
Diffstat (limited to 'lib/test_printf.c')
0 files changed, 0 insertions, 0 deletions