On Wed, Jun 30, 2021 at 09:48:00PM +0000, David Matlack wrote: > Make fast_page_fault interoperate with the TDP MMU by leveraging > walk_shadow_page_lockless_{begin,end} to acquire the RCU read lock and > introducing a new helper function kvm_tdp_mmu_get_last_sptep_lockless to > grab the lowest level sptep. > > Suggested-by: Ben Gardon <bgardon@xxxxxxxxxx> > Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx> > --- > arch/x86/kvm/mmu/mmu.c | 55 +++++++++++++++++++++++++++----------- > arch/x86/kvm/mmu/tdp_mmu.c | 36 +++++++++++++++++++++++++ > arch/x86/kvm/mmu/tdp_mmu.h | 2 ++ > 3 files changed, 78 insertions(+), 15 deletions(-) > ... > +/* > + * Must be called between kvm_tdp_mmu_walk_shadow_page_lockless_{begin,end}. > + * > + * The returned sptep must not be used after > + * kvm_tdp_mmu_walk_shadow_page_lockless_end. > + */ The function names in the comment are spelled wrong and should be: /* * Must be called between kvm_tdp_mmu_walk_lockless_{begin,end}. * * The returned sptep must not be used after kvm_tdp_mmu_walk_lockless_end. */