[PATCH v2 0/3] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-06-24 Thread Vivek Kasireddy
u. Cc: Jason Gunthorpe Cc: Christoph Hellwig Cc: Robin Murphy Cc: Christian König Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Alex Williamson Cc: Kevin Tian Vivek Kasireddy (3): vfio: Export vfio device get and put registration helpers vfio/pci: Share the core device pointer while inv

[PATCH v2 2/3] vfio/pci: Share the core device pointer while invoking feature functions

2024-06-24 Thread Vivek Kasireddy
There is no need to share the main device pointer (struct vfio_device *) with all the feature functions as they only need the core device pointer. Therefore, extract the core device pointer once in the caller (vfio_pci_core_ioctl_feature) and share it instead. Signed-off-by: Vivek Kasireddy

[PATCH v2 3/3] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-06-24 Thread Vivek Kasireddy
g enhancements are made to the original patch: - Add support for creating dmabuf from multiple areas (or ranges) - Add a mmap handler to provide CPU access to the dmabuf Original-patch-by: Jason Gunthorpe Signed-off-by: Vivek Kasireddy --- drivers/vfio/pci/Makefile | 1 + dri

[PATCH v2 1/3] vfio: Export vfio device get and put registration helpers

2024-06-24 Thread Vivek Kasireddy
These helpers are useful for managing additional references taken on the device from other associated VFIO modules. Original-patch-by: Jason Gunthorpe Signed-off-by: Vivek Kasireddy --- drivers/vfio/vfio_main.c | 2 ++ include/linux/vfio.h | 2 ++ 2 files changed, 4 insertions(+) diff

[PATCH v1 2/5] drm/virtio: Add a helper to map and note the dma addrs and lengths

2024-06-24 Thread Vivek Kasireddy
This helper would be used when first initializing the object as part of import and also when updating the plane where we need to ensure that the imported object's backing is valid. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 5 +++ drivers/gpu

[PATCH v1 3/5] drm/virtio: Add helpers to initialize and free the imported object

2024-06-24 Thread Vivek Kasireddy
The imported object can be considered a guest blob resource; therefore, we use create_blob cmd while creating it. These helpers are used in the next patch which does the actual import. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++ drivers

[PATCH v1 5/5] drm/virtio: Add prepare and cleanup routines for imported dmabuf obj

2024-06-24 Thread Vivek Kasireddy
-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 71 +- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index a72a2dbda031..5ab0741b67cd 100644 --- a/drivers/gpu/drm

[PATCH v1 4/5] drm/virtio: Import prime buffers from other devices as guest blobs

2024-06-24 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 58 +- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio

[PATCH v1 0/5] drm/virtio: Import scanout buffers from other devices

2024-06-24 Thread Vivek Kasireddy
Wajdeczko Cc: Michael Tretter Vivek Kasireddy (5): drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd drm/virtio: Add a helper to map and note the dma addrs and lengths drm/virtio: Add helpers to initialize and free the imported object drm/virtio: Import prime buffers from

[PATCH v1 1/5] drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd

2024-06-24 Thread Vivek Kasireddy
This cmd is useful to let the VMM (i.e, Qemu) know that the backing store associated with a resource is no longer valid, so that the VMM can perform any cleanup or unmap operations. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++ drivers/gpu

[PATCH v16 5/9] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-06-24 Thread Vivek Kasireddy
Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8

[PATCH v16 9/9] selftests/udmabuf: Add tests to verify data after page migration

2024-06-24 Thread Vivek Kasireddy
and Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Cc: linux-kselft...@vger.kernel.org Suggested-by: Mike Kravetz Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/

[PATCH v16 3/9] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-06-24 Thread Vivek Kasireddy
) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 137 ++ mm

[PATCH v16 8/9] udmabuf: Pin the pages using memfd_pin_folios() API

2024-06-24 Thread Vivek Kasireddy
Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 155 -- 1 file changed, 80 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index e67515808ed3..047c3cd2ceff 100644

[PATCH v16 7/9] udmabuf: Convert udmabuf driver to use folios

2024-06-24 Thread Vivek Kasireddy
Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 139 +++--- 1 file changed, 83 insertions(+), 56 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..e67515808ed3 100644

[PATCH v16 6/9] udmabuf: Add back support for mapping hugetlb pages

2024-06-24 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122 +++--- 1 file changed, 101 insertions(+), 21 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 820c993c8659..274defd3fa3e 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v16 0/9] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-06-24 Thread Vivek Kasireddy
dor Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Arnd Bergmann (1): udmabuf: add CONFIG_MMU dependency Vivek Kasireddy (8): mm/gup: Introduce unpin_folio/unpin_folios helpers mm/gup: Introduce check_and_migrate_mo

[PATCH v16 2/9] mm/gup: Introduce check_and_migrate_movable_folios()

2024-06-24 Thread Vivek Kasireddy
Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- mm/gup.c | 124 ++- 1 file changed, 77 insertions(+), 47 deletions(-) diff

[PATCH v16 4/9] udmabuf: add CONFIG_MMU dependency

2024-06-24 Thread Vivek Kasireddy
dling mmap") Signed-off-by: Arnd Bergmann Acked-by: David Hildenbrand Acked-by: Vivek Kasireddy --- drivers/dma-buf/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index e4dc53a36428..b46eb8a552d7 100644 --- a/drivers/dma-b

[PATCH v16 1/9] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-06-24 Thread Vivek Kasireddy
folio is anon-exclusive (via a per folio AnonExclusive flag). Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek

[PATCH v15 8/9] udmabuf: Pin the pages using memfd_pin_folios() API

2024-06-13 Thread Vivek Kasireddy
Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 155 -- 1 file changed, 80 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index e67515808ed3..047c3cd2ceff 100644

[PATCH v15 5/9] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-06-13 Thread Vivek Kasireddy
Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8

[PATCH v15 9/9] selftests/udmabuf: Add tests to verify data after page migration

2024-06-13 Thread Vivek Kasireddy
and Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Cc: linux-kselft...@vger.kernel.org Suggested-by: Mike Kravetz Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/

[PATCH v15 4/9] udmabuf: add CONFIG_MMU dependency

2024-06-13 Thread Vivek Kasireddy
dling mmap") Signed-off-by: Arnd Bergmann Acked-by: David Hildenbrand Acked-by: Vivek Kasireddy --- drivers/dma-buf/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index e4dc53a36428..b46eb8a552d7 100644 --- a/drivers/dma-b

[PATCH v15 1/9] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-06-13 Thread Vivek Kasireddy
folio is anon-exclusive (via a per folio AnonExclusive flag). Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek

[PATCH v15 6/9] udmabuf: Add back support for mapping hugetlb pages

2024-06-13 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122 +++--- 1 file changed, 101 insertions(+), 21 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 820c993c8659..274defd3fa3e 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v15 7/9] udmabuf: Convert udmabuf driver to use folios

2024-06-13 Thread Vivek Kasireddy
Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 139 +++--- 1 file changed, 83 insertions(+), 56 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..e67515808ed3 100644

[PATCH v15 2/9] mm/gup: Introduce check_and_migrate_movable_folios()

2024-06-13 Thread Vivek Kasireddy
Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- mm/gup.c | 124 ++- 1 file changed, 77 insertions(+), 47 deletions(-) diff

[PATCH v15 3/9] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-06-13 Thread Vivek Kasireddy
) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Acked-by: Dave Airlie Acked-by: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 ++ mm

[PATCH v15 0/9] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-06-13 Thread Vivek Kasireddy
Kim Cc: Junxiao Chang Arnd Bergmann (1): udmabuf: add CONFIG_MMU dependency Vivek Kasireddy (8): mm/gup: Introduce unpin_folio/unpin_folios helpers mm/gup: Introduce check_and_migrate_movable_folios() mm/gup: Introduce memfd_pin_folios() for pinning memfd folios udmabuf: Use vmf_insert_pfn a

[PATCH v1 2/2] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-04-22 Thread Vivek Kasireddy
g enhancements are made to the original patch: - Use P2P DMA APIs to create pages (ZONE_DEVICE) instead of DMA addrs - Add a mmap handler to provide CPU access to the dmabuf - Add support for creating dmabuf from multiple areas (or ranges) Original-patch-by: Jason Gunthorpe Signed-off-by: Vivek

[PATCH v1 0/2] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-04-22 Thread Vivek Kasireddy
Christian König Cc: Daniel Vetter Cc: Oded Gabbay Cc: Gerd Hoffmann Cc: Alex Williamson Cc: Kevin Tian Vivek Kasireddy (2): vfio: Export vfio device get and put registration helpers vfio/pci: Allow MMIO regions to be exported through dma-buf drivers/vfio/pci/Makefile | 1 + driver

[PATCH v1 1/2] vfio: Export vfio device get and put registration helpers

2024-04-22 Thread Vivek Kasireddy
These helpers are useful for managing additional references taken on the device from other associated VFIO modules. Original-patch-by: Jason Gunthorpe Signed-off-by: Vivek Kasireddy --- drivers/vfio/vfio_main.c | 2 ++ include/linux/vfio.h | 2 ++ 2 files changed, 4 insertions(+) diff

[PATCH v14 7/8] udmabuf: Pin the pages using memfd_pin_folios() API

2024-04-11 Thread Vivek Kasireddy
-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 153 +++--- 1 file changed, 78 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index a8f3af61f7f2..afa8bfd2a2a9 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma

[PATCH v14 4/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-04-11 Thread Vivek Kasireddy
Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions

[PATCH v14 2/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-04-11 Thread Vivek Kasireddy
Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- mm/gup.c | 124 ++- 1 file changed, 77 insertions(+), 47 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 14e94fdfa827

[PATCH v14 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-04-11 Thread Vivek Kasireddy
folio is anon-exclusive (via a per folio AnonExclusive flag). Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- include/linux/mm.h | 2 ++ mm

[PATCH v14 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-04-11 Thread Vivek Kasireddy
and Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Cc: linux-kselft...@vger.kernel.org Suggested-by: Mike Kravetz Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 214 +++---

[PATCH v14 3/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-04-11 Thread Vivek Kasireddy
) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 ++ mm/memfd.c| 35 +++ 4 files

[PATCH v14 5/8] udmabuf: Add back support for mapping hugetlb pages

2024-04-11 Thread Vivek Kasireddy
=on with -display gtk,gl=off above would exercise the mmap handler. Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma

[PATCH v14 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-04-11 Thread Vivek Kasireddy
ph Hellwig Cc: Andrew Morton Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (8): mm/gup: Introduce unpin_folio/unpin_folios helpers mm/gup: Introduce check_and_migrate_movable_folios() mm/gup: I

[PATCH v14 6/8] udmabuf: Convert udmabuf driver to use folios

2024-04-11 Thread Vivek Kasireddy
from udmabuf_create() into these helpers improves readability given that udmabuf_create() is a bit long. Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Daniel Vetter Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek

[PATCH v13 5/8] udmabuf: Add back support for mapping hugetlb pages

2024-04-04 Thread Vivek Kasireddy
=on with -display gtk,gl=off above would exercise the mmap handler. Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma

[PATCH v13 6/8] udmabuf: Convert udmabuf driver to use folios

2024-04-04 Thread Vivek Kasireddy
Wilcox Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57

[PATCH v13 7/8] udmabuf: Pin the pages using memfd_pin_folios() API

2024-04-04 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 153 +++--- 1 file changed, 78 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index a8f3af61f7f2..afa8bfd2a2a9 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v13 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-04-04 Thread Vivek Kasireddy
folio is anon-exclusive (via a per folio AnonExclusive flag). Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- include/linux/mm.h | 2 ++ mm/gup.c | 47

[PATCH v13 3/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-04-04 Thread Vivek Kasireddy
Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 ++ mm/memfd.c| 35

[PATCH v13 4/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-04-04 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

[PATCH v13 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-04-04 Thread Vivek Kasireddy
. Cc: Shuah Khan Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1

[PATCH v13 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-04-04 Thread Vivek Kasireddy
er Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (8): mm/gup: Introduce unpin_folio/unpin_folios helpers mm/gup: Introduce check_and_migrate_movable_folios() mm/gup: Introduce memfd_pin_folios() for pinning memfd folios udmabuf: Use vmf_ins

[PATCH v13 2/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-04-04 Thread Vivek Kasireddy
Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- mm/gup.c | 122 --- 1 file changed, 81 insertions(+), 41 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 9cf2adfa4ce5..00ee3b987307 100644 --- a/mm

[RFC 5/7] drm/virtio: Ensure that bo's backing store is valid while updating plane

2024-03-28 Thread Vivek Kasireddy
(resource_flush) is in progress. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c

[RFC 6/7] udmabuf/uapi: Add new ioctl to create a dmabuf from PCI bar regions

2024-03-28 Thread Vivek Kasireddy
zes and also the bar number as part of this request. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/uapi/linux/udmabuf.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/udmabuf.h b/include/uapi/linux/udmabuf.h index 46b6532ed855.

[RFC 7/7] udmabuf: Implement UDMABUF_CREATE_LIST_FOR_PCIDEV ioctl

2024-03-28 Thread Vivek Kasireddy
ers. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122 +++--- 1 file changed, 114 insertions(+), 8 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..7355451ed337 100644 --- a/driv

[RFC 4/7] drm/virtio: Import prime buffers from other devices as guest blobs

2024-03-28 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 54 +- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio

[RFC 1/7] drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd

2024-03-28 Thread Vivek Kasireddy
This cmd is useful to let the VMM (i.e, Qemu) know that the backing store associated with a resource is no longer valid, so that the VMM can perform any cleanup or unmap operations. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++ drivers/gpu

[RFC 0/7] drm/virtio: Import scanout buffers from other devices

2024-03-28 Thread Vivek Kasireddy
o Cc: Rob Clark Cc: Thomas Hellström Cc: Oded Gabbay Cc: Michal Wajdeczko Cc: Michael Tretter Vivek Kasireddy (7): drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd drm/virtio: Add a helper to map and note the dma addrs and lengths drm/virtio: Add helpers to initializ

[RFC 2/7] drm/virtio: Add a helper to map and note the dma addrs and lengths

2024-03-28 Thread Vivek Kasireddy
This helper would be used when first initializing the object as part of import and also when updating the plane where we need to ensure that the imported object's backing is valid. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 drivers

[RFC 3/7] drm/virtio: Add helpers to initialize and free the imported object

2024-03-28 Thread Vivek Kasireddy
The imported object can be considered a guest blob resource; therefore, we use create_blob cmd while creating it. These helpers are used in the next patch which does the actual import. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 69

[PATCH v12 6/8] udmabuf: Convert udmabuf driver to use folios

2024-02-25 Thread Vivek Kasireddy
Wilcox Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57

[PATCH v12 7/8] udmabuf: Pin the pages using memfd_pin_folios() API

2024-02-25 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 153 +++--- 1 file changed, 78 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index a8f3af61f7f2..afa8bfd2a2a9 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v12 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-02-25 Thread Vivek Kasireddy
. Cc: Shuah Khan Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1

[PATCH v12 4/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-02-25 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

[PATCH v12 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-02-25 Thread Vivek Kasireddy
e API pass in file * instead of fd (Jason) Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Cc: Andrew Morton Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek

[PATCH v12 2/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-02-25 Thread Vivek Kasireddy
Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- mm/gup.c | 129 +++ 1 file changed, 92 insertions(+), 37 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index

[PATCH v12 5/8] udmabuf: Add back support for mapping hugetlb pages

2024-02-25 Thread Vivek Kasireddy
=on with -display gtk,gl=off above would exercise the mmap handler. Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma

[PATCH v12 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-02-25 Thread Vivek Kasireddy
: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- include/linux/mm.h | 2 ++ mm/gup.c | 81 -- 2 files changed, 74 insertions(+), 9

[PATCH v12 3/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-02-25 Thread Vivek Kasireddy
Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 ++ mm/memfd.c| 34

[PATCH v11 4/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-01-12 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

[PATCH v11 5/8] udmabuf: Add back support for mapping hugetlb pages

2024-01-12 Thread Vivek Kasireddy
=on with -display gtk,gl=off above would exercise the mmap handler. Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma

[PATCH v11 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-01-12 Thread Vivek Kasireddy
. Cc: Shuah Khan Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1

[PATCH v11 2/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-01-12 Thread Vivek Kasireddy
Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- mm/gup.c | 129 +++ 1 file changed, 92 insertions(+), 37 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index

[PATCH v11 6/8] udmabuf: Convert udmabuf driver to use folios

2024-01-12 Thread Vivek Kasireddy
Wilcox Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57

[PATCH v11 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-01-12 Thread Vivek Kasireddy
ad of fd (Jason) Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (8): mm/gup: Introduce unpin_fol

[PATCH v11 1/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-01-12 Thread Vivek Kasireddy
: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- include/linux/mm.h | 2 ++ mm/gup.c | 81 -- 2 files changed, 74 insertions(+), 9

[PATCH v11 7/8] udmabuf: Pin the pages using memfd_pin_folios() API

2024-01-12 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 153 +++--- 1 file changed, 78 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index a8f3af61f7f2..afa8bfd2a2a9 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v11 3/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios

2024-01-12 Thread Vivek Kasireddy
Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 ++ mm/memfd.c| 34

[PATCH v10 6/8] udmabuf: Convert udmabuf driver to use folios (v2)

2024-01-03 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..a8f3af61f7f2 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v10 4/8] mm/gup: Introduce check_and_migrate_movable_folios()

2024-01-03 Thread Vivek Kasireddy
Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- mm/gup.c | 129 +++ 1 file changed, 92 insertions(+), 37 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index

[PATCH v10 3/8] mm/gup: Introduce unpin_folio/unpin_folios helpers

2024-01-03 Thread Vivek Kasireddy
: David Hildenbrand Cc: Matthew Wilcox Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Peter Xu Suggested-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- include/linux/mm.h | 2 ++ mm/gup.c | 81 -- 2 files changed, 74 insertions(+), 9

[PATCH v10 8/8] selftests/dma-buf/udmabuf: Add tests to verify data after page migration

2024-01-03 Thread Vivek Kasireddy
: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Based-on-patch-by: Mike Kravetz Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1 file changed, 147 insertions

[PATCH v10 5/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v10)

2024-01-03 Thread Vivek Kasireddy
son Gunthorpe Reviewed-by: Jason Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 136 +

[PATCH v10 7/8] udmabuf: Pin the pages using memfd_pin_folios() API (v8)

2024-01-03 Thread Vivek Kasireddy
lio() instead of unpin_user_page() to unpin folio Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabu

[PATCH v10 1/8] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2024-01-03 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

[PATCH v10 0/8] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v10)

2024-01-03 Thread Vivek Kasireddy
Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (8): udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap udmabuf: Add back support for mapping hugetlb pages (v6) mm/gup: Introduce unpin_folio/unpin_folios helpers mm/gup

[PATCH v10 2/8] udmabuf: Add back support for mapping hugetlb pages (v6)

2024-01-03 Thread Vivek Kasireddy
context and into common code Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122

[PATCH v9 4/6] udmabuf: Convert udmabuf driver to use folios (v2)

2023-12-27 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..a8f3af61f7f2 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v9 6/6] selftests/dma-buf/udmabuf: Add tests to verify data after page migration

2023-12-27 Thread Vivek Kasireddy
: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Based-on-patch-by: Mike Kravetz Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1 file changed, 147 insertions

[PATCH v9 5/6] udmabuf: Pin the pages using memfd_pin_folios() API (v7)

2023-12-27 Thread Vivek Kasireddy
and Cc: Matthew Wilcox Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 153 +++--- 1 file changed,

[PATCH v9 3/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v9)

2023-12-27 Thread Vivek Kasireddy
ter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe (v2) Reviewed-by: David Hildenbrand (v3) Reviewed-by: Christoph Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/

[PATCH v9 2/6] udmabuf: Add back support for mapping hugetlb pages (v6)

2023-12-27 Thread Vivek Kasireddy
context and into common code Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122

[PATCH v9 1/6] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2023-12-27 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

[PATCH v9 0/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v9)

2023-12-27 Thread Vivek Kasireddy
Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (6): udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling

[PATCH v8 4/6] udmabuf: Convert udmabuf driver to use folios (v2)

2023-12-15 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 140 ++ 1 file changed, 83 insertions(+), 57 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 274defd3fa3e..a8f3af61f7f2 100644 --- a/drivers/dma-buf/udmabuf.c

[PATCH v8 3/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v8)

2023-12-15 Thread Vivek Kasireddy
Hellwig (v6) Signed-off-by: Vivek Kasireddy --- include/linux/memfd.h | 5 ++ include/linux/mm.h| 3 + mm/gup.c | 149 ++ mm/memfd.c| 34 ++ 4 files changed, 191 insertions(+) diff --git a/include/linux/memfd.h b/

[PATCH v8 5/6] udmabuf: Pin the pages using memfd_pin_folios() API (v6)

2023-12-15 Thread Vivek Kasireddy
Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 124 +++--- 1 file changed, 49 insertions(+), 75 deletions(-) diff --git a/drivers/dma-buf/udmabu

[PATCH v8 6/6] selftests/dma-buf/udmabuf: Add tests to verify data after page migration

2023-12-15 Thread Vivek Kasireddy
: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Based-on-patch-by: Mike Kravetz Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 151 +- 1 file changed, 147 insertions

[PATCH v8 2/6] udmabuf: Add back support for mapping hugetlb pages (v6)

2023-12-15 Thread Vivek Kasireddy
context and into common code Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Acked-by: Mike Kravetz (v2) Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 122

[PATCH v8 0/6] mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v8)

2023-12-15 Thread Vivek Kasireddy
Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Vivek Kasireddy (6): udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap udmabuf: Add back support for mapping hugetlb pages (v6) mm/gup: Introduce memfd_pin_folios() for pinning memfd folios (v8) udmabuf: Convert udmabuf driver to use

[PATCH v8 1/6] udmabuf: Use vmf_insert_pfn and VM_PFNMAP for handling mmap

2023-12-15 Thread Vivek Kasireddy
Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Signed-off-by: Vivek Kasireddy --- drivers/dma-buf/udmabuf.c | 8 +--- 1 file changed, 5

  1   2   3   >