[PATCH v2 hmm 9/9] mm/hmm: return error for non-vma snapshots

2020-03-30 Thread Jason Gunthorpe
From: Jason Gunthorpe The pagewalker does not call most ops with NULL vma, those are all routed to hmm_vma_walk_hole() via ops->pte_hole instead. Thus hmm_vma_fault() is only called with a NULL vma from hmm_vma_walk_hole(), so hoist the NULL vma check to there. Now it is clear that

[PATCH v2 hmm 9/9] mm/hmm: return error for non-vma snapshots

2020-03-24 Thread Jason Gunthorpe
From: Jason Gunthorpe The pagewalker does not call most ops with NULL vma, those are all routed to pte_hole instead. Thus hmm_vma_fault() is only called with a NULL vma from hmm_vma_walk_hole(), so hoist the check to there. Now it is clear that snapshotting with no vma is a HMM_PFN_ERROR as