linux/arch/x86/kvm/mmu
Sean Christopherson 3039bcc744 KVM: Move x86's MMU notifier memslot walkers to generic code
Move the hva->gfn lookup for MMU notifiers into common code.  Every arch
does a similar lookup, and some arch code is all but identical across
multiple architectures.

In addition to consolidating code, this will allow introducing
optimizations that will benefit all architectures without incurring
multiple walks of the memslots, e.g. by taking mmu_lock if and only if a
relevant range exists in the memslots.

The use of __always_inline to avoid indirect call retpolines, as done by
x86, may also benefit other architectures.

Consolidating the lookups also fixes a wart in x86, where the legacy MMU
and TDP MMU each do their own memslot walks.

Lastly, future enhancements to the memslot implementation, e.g. to add an
interval tree to track host address, will need to touch far less arch
specific code.

MIPS, PPC, and arm64 will be converted one at a time in future patches.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210402005658.3024832-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-04-17 08:31:06 -04:00
..
mmu_audit.c KVM: x86/mmu: Use '0' as the one and only value for an invalid PAE root 2021-03-15 04:44:07 -04:00
mmu_internal.h KVM: x86/mmu: Pass address space ID to TDP MMU root walkers 2021-04-17 08:30:55 -04:00
mmu.c KVM: Move x86's MMU notifier memslot walkers to generic code 2021-04-17 08:31:06 -04:00
mmutrace.h kvm: x86/mmu: Add TDP MMU SPTE changed trace point 2020-11-19 10:57:16 -05:00
page_track.c KVM: x86/mmu: Use an rwlock for the x86 MMU 2021-02-04 05:27:43 -05:00
paging_tmpl.h KVM: x86/mmu: Make Host-writable and MMU-writable bit locations dynamic 2021-03-15 04:43:49 -04:00
spte.c KVM: x86/mmu: Use low available bits for removed SPTEs 2021-03-15 04:43:54 -04:00
spte.h KVM: x86/mmu: Use low available bits for removed SPTEs 2021-03-15 04:43:54 -04:00
tdp_iter.c KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_iter.h KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_mmu.c KVM: Move x86's MMU notifier memslot walkers to generic code 2021-04-17 08:31:06 -04:00
tdp_mmu.h KVM: Move x86's MMU notifier memslot walkers to generic code 2021-04-17 08:31:06 -04:00