Re: [PATCH hmm v2 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault

From: Jason Gunthorpe
Date: Wed May 06 2020 - 12:18:28 EST


On Fri, May 01, 2020 at 05:53:26PM -0700, Ralph Campbell wrote:
> > Acked-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
> > Tested-by: Ralph Campbell <rcampbell@xxxxxxxxxx>
> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > Documentation/vm/hmm.rst | 26 ++--
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 35 ++----
> > drivers/gpu/drm/nouveau/nouveau_dmem.c | 27 +---
> > drivers/gpu/drm/nouveau/nouveau_dmem.h | 3 +-
> > drivers/gpu/drm/nouveau/nouveau_svm.c | 87 ++++++++-----
> > include/linux/hmm.h | 99 ++++++---------
> > mm/hmm.c | 160 +++++++++++-------------
> > 7 files changed, 192 insertions(+), 245 deletions(-)
> >
>
> ...snip...
>
> > +static void nouveau_hmm_convert_pfn(struct nouveau_drm *drm,
> > + struct hmm_range *range, u64 *ioctl_addr)
> > +{
> > + unsigned long i, npages;
> > +
> > + /*
> > + * The ioctl_addr prepared here is passed through nvif_object_ioctl()
> > + * to an eventual DMA map in something like gp100_vmm_pgt_pfn()
> > + *
> > + * This is all just encoding the internal hmm reprensetation into a
>
> s/reprensetation/representation/
>
> Looks good and still tests OK with nouveau.

Got it, thanks

Jason