diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-16 20:32:14 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-26 18:33:38 +0100 |
commit | 800bb1c8dc80bb4121446b56813067f3ea44edee (patch) | |
tree | 8ed199bf4aac9982b7863d71c0448742769f1a63 /arch/powerpc | |
parent | memremap: add an owner field to struct dev_pagemap (diff) | |
download | linux-800bb1c8dc80bb4121446b56813067f3ea44edee.tar.xz linux-800bb1c8dc80bb4121446b56813067f3ea44edee.zip |
mm: handle multiple owners of device private pages in migrate_vma
Add a new src_owner field to struct migrate_vma. If the field is set,
only device private pages with page->pgmap->owner equal to that field are
migrated. If the field is not set only "normal" pages are migrated.
Fixes: df6ad69838fc ("mm/device-public-memory: device memory cache coherent with CPU")
Link: https://lore.kernel.org/r/20200316193216.920734-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Tested-by: Bharata B Rao <bharata@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_uvmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_hv_uvmem.c index 67fefb03b9b7..f44f6b27950f 100644 --- a/arch/powerpc/kvm/book3s_hv_uvmem.c +++ b/arch/powerpc/kvm/book3s_hv_uvmem.c @@ -563,6 +563,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start, mig.end = end; mig.src = &src_pfn; mig.dst = &dst_pfn; + mig.src_owner = &kvmppc_uvmem_pgmap; mutex_lock(&kvm->arch.uvmem_lock); /* The requested page is already paged-out, nothing to do */ |