Commit 193bbfa
KVM: Drop .on_unlock() mmu_notifier hook
Drop the .on_unlock() mmu_notifer hook now that it's no longer used for
notifying arch code that memory has been reclaimed. Adding .on_unlock()
and invoking it *after* dropping mmu_lock was a terrible idea, as doing so
resulted in .on_lock() and .on_unlock() having divergent and asymmetric
behavior, and set future developers up for failure, i.e. all but asked for
bugs where KVM relied on using .on_unlock() to try to run a callback while
holding mmu_lock.
Opportunistically add a lockdep assertion in kvm_mmu_invalidate_end() to
guard against future bugs of this nature.
Reported-by: Isaku Yamahata <isaku.yamahata@intel.com>
Link: https://lore.kernel.org/all/20230802203119.GB2021422@ls.amr.corp.intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Message-Id: <20231027182217.3615211-12-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent cec29ee commit 193bbfa
1 file changed
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
| |||
556 | 555 | | |
557 | 556 | | |
558 | 557 | | |
559 | | - | |
560 | 558 | | |
561 | 559 | | |
562 | 560 | | |
| |||
663 | 661 | | |
664 | 662 | | |
665 | 663 | | |
666 | | - | |
| 664 | + | |
667 | 665 | | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | 666 | | |
672 | 667 | | |
673 | 668 | | |
| |||
687 | 682 | | |
688 | 683 | | |
689 | 684 | | |
690 | | - | |
691 | 685 | | |
692 | 686 | | |
693 | 687 | | |
| |||
706 | 700 | | |
707 | 701 | | |
708 | 702 | | |
709 | | - | |
710 | 703 | | |
711 | 704 | | |
712 | 705 | | |
| |||
813 | 806 | | |
814 | 807 | | |
815 | 808 | | |
816 | | - | |
817 | 809 | | |
818 | 810 | | |
819 | 811 | | |
| |||
891 | 883 | | |
892 | 884 | | |
893 | 885 | | |
894 | | - | |
895 | 886 | | |
896 | 887 | | |
897 | 888 | | |
| |||
0 commit comments