]> git.ipfire.org Git - thirdparty/linux.git/commit
memremap: add an owner field to struct dev_pagemap
authorChristoph Hellwig <hch@lst.de>
Mon, 16 Mar 2020 19:32:13 +0000 (20:32 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 26 Mar 2020 17:33:37 +0000 (14:33 -0300)
commitf894ddd5ff01d3bb48faf4dc533536bf5269c17a
tree6e62359994be7d1e61aab32864b6cc399cbb09e5
parent5a0c38d307afde167175602aa52ca4e6c5c42c44
memremap: add an owner field to struct dev_pagemap

Add a new opaque owner field to struct dev_pagemap, which will allow the
hmm and migrate_vma code to identify who owns ZONE_DEVICE memory, and
refuse to work on mappings not owned by the calling entity.

Link: https://lore.kernel.org/r/20200316193216.920734-2-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>
arch/powerpc/kvm/book3s_hv_uvmem.c
drivers/gpu/drm/nouveau/nouveau_dmem.c
include/linux/memremap.h
mm/memremap.c