mm/migrate: add a flags parameter to migrate_vma
authorRalph Campbell <rcampbell@nvidia.com>
Thu, 23 Jul 2020 22:30:00 +0000 (15:30 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 28 Jul 2020 19:20:33 +0000 (16:20 -0300)
commit5143192cd410c4fc83be09a2e73423765aee072b
treee6943dd73d6cad7a9afc3fdeeb90542d5bef4a50
parent1a77decd0caed0bc5b6f5e474981d574076f0841
mm/migrate: add a flags parameter to migrate_vma

The src_owner field in struct migrate_vma is being used for two purposes,
it acts as a selection filter for which types of pages are to be migrated
and it identifies device private pages owned by the caller.

Split this into separate parameters so the src_owner field can be used
just to identify device private pages owned by the caller of
migrate_vma_setup().

Rename the src_owner field to pgmap_owner to reflect it is now used only
to identify which device private pages to migrate.

Link: https://lore.kernel.org/r/20200723223004.9586-3-rcampbell@nvidia.com
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
arch/powerpc/kvm/book3s_hv_uvmem.c
drivers/gpu/drm/nouveau/nouveau_dmem.c
include/linux/migrate.h
lib/test_hmm.c
mm/migrate.c