[PATCH] drm/virtio: Fix NULL pointer deref in virtgpu_dma_buf_free_obj()

2025-05-01 Thread Vivek Kasireddy
import(). Fixes: 415cb45895f4 ("drm/virtio: Use dma_buf from GEM object instance") Cc: Dmitry Osipenko Cc: Thomas Zimmermann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_prime.c | 3 ++- 2 files changed, 3 insertion

[PATCH] drm/virtio: Fix flickering issue seen with imported dmabufs

2025-03-25 Thread Vivek Kasireddy
Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index fe6a0b018571..ceb0401a000b 100644 --- a/drivers/gpu/

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

2025-03-06 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 v3 1/3] vfio: Export vfio device get and put registration helpers

2025-03-06 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 v3 3/3] vfio/pci: Allow MMIO regions to be exported through dma-buf

2025-03-06 Thread Vivek Kasireddy
lowing enhancements are made to the original patch: - Add support for creating dmabuf from multiple areas (or ranges) Cc: Alex Williamson Cc: Simona Vetter Cc: Christian König Original-patch-by: Jason Gunthorpe Signed-off-by: Vivek Kasireddy --- drivers/vfio/pci/Makefile

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

2025-03-06 Thread Vivek Kasireddy
Cc: Shameer Kolothum Cc: Kevin Tian Cc: Wei Lin Guay Cc: Xu Yilun Vivek Kasireddy (3): vfio: Export vfio device get and put registration helpers vfio/pci: Share the core device pointer while invoking feature functions vfio/pci: Allow MMIO regions to be exported through dma-

[PATCH v2 2/2] selftests/udmabuf: add a test to pin first before writing to memfd

2025-01-14 Thread Vivek Kasireddy
getlb folios to satisfy the allocation needs. Cc: Gerd Hoffmann Cc: Steve Sistare Cc: Muchun Song Cc: David Hildenbrand Cc: Andrew Morton Signed-off-by: Vivek Kasireddy --- .../selftests/drivers/dma-buf/udmabuf.c | 20 ++- 1 file changed, 19 insertions(+), 1 deletion(-)

[PATCH v2 0/2] mm/memfd: reserve hugetlb folios before allocation

2025-01-14 Thread Vivek Kasireddy
e as well - Added a new udmabuf selftest to exercise the same path as that of syzbot Cc: Gerd Hoffmann Cc: Steve Sistare Cc: Muchun Song Cc: David Hildenbrand Cc: Andrew Morton Vivek Kasireddy (2): mm/memfd: reserve hugetlb folios before allocation selftests/udmabuf: add a test to pin fir

[PATCH v2 1/2] mm/memfd: reserve hugetlb folios before allocation

2025-01-14 Thread Vivek Kasireddy
m/hugetlb: fix memfd_pin_folios resv_huge_pages leak") Reported-by: syzbot+a504cb5bae4fe117b...@syzkaller.appspotmail.com Signed-off-by: Vivek Kasireddy Cc: Steve Sistare Cc: Muchun Song Cc: David Hildenbrand Cc: Andrew Morton --- include/linux/hugetlb.h | 5 + mm/hugetl

[PATCH] drm/virtio: Don't return error if virtio-gpu PCI dev is not found

2025-01-14 Thread Vivek Kasireddy
initialization") Suggested-by: Dmitry Osipenko Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_

[PATCH] drm/virtio: Fix Smatch tool warnings in virtgpu_dma_buf_free_obj()

2024-12-11 Thread Vivek Kasireddy
helpers to initialize and free the imported object") Fixes: ca77f27a2665 ("drm/virtio: Import prime buffers from other devices as guest blobs") Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Gurchetan Singh Cc: Chia-I Wu Reported-by: Dan Carpenter Signed-off-by: Vivek Kasiredd

[PATCH] drm/virtio: Lock the VGA resources during initialization

2024-12-10 Thread Vivek Kasireddy
ld release the lock to allow other VGA compatible devices to access these shared VGA resources. Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu Reported-by: Dmitry Osipenko Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.c | 40 +++- 1 file

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

2024-11-25 Thread Vivek Kasireddy
from a patch by Dmitry Osipenko . Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h| 5 drivers/gpu/drm/virtio/virtgpu_object.c | 21 +++ drivers/gpu/drm/virtio

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

2024-11-25 Thread Vivek Kasireddy
Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 65 +- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio

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

2024-11-25 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek

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

2024-11-25 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/drivers

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

2024-11-25 Thread Vivek Kasireddy
U. Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Simona Vetter Cc: Christian Koenig Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu 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 l

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

2024-11-25 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by:

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

2024-11-24 Thread Vivek Kasireddy
RPL iGPU. Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Simona Vetter Cc: Christian Koenig Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Vivek Kasireddy (5): drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd drm/virtio: Add a helper to map and note t

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

2024-11-24 Thread Vivek Kasireddy
Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 65 +- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio

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

2024-11-24 Thread Vivek Kasireddy
from a patch by Dmitry Osipenko . Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h| 5 + drivers/gpu/drm/virtio/virtgpu_object.c | 23 +++ drivers/gpu/drm

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

2024-11-24 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/drivers

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

2024-11-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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek

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

2024-11-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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by:

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

2024-11-18 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers

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

2024-11-18 Thread Vivek Kasireddy
Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 65 +- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio

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

2024-11-18 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek

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

2024-11-18 Thread Vivek Kasireddy
from a patch by Dmitry Osipenko . Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h| 5 + drivers/gpu/drm/virtio/virtgpu_object.c | 23 +++ drivers/gpu/drm

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

2024-11-18 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by:

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

2024-11-18 Thread Vivek Kasireddy
sing a RPL iGPU. Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Simona Vetter Cc: Christian Koenig Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Vivek Kasireddy (5): drm/virtio: Implement VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING cmd drm/virtio: Add a helper to map and note the

[PATCH v2 1/5] PCI/P2PDMA: Don't enforce ACS check for functions of same device

2024-10-20 Thread Vivek Kasireddy
check. v2: - Relax the enforcment of ACS check only for Intel GPU functions as they are P2PDMA compatible given the way the PF provisions the resources among multiple VFs. Cc: Bjorn Helgaas Cc: Logan Gunthorpe Cc: Signed-off-by: Vivek Kasireddy --- drivers/pci/p2pdma.c | 17

[PATCH v2 2/5] drm/xe/dmabuf: Don't migrate BO to System RAM while running in VF mode

2024-10-20 Thread Vivek Kasireddy
If the importer has allow_peer2peer set to true, then we can expect that it would be able to handle VRAM addresses. Therefore, in this specific case and only while running in VF mode, do not migrate the BO to System RAM before exporting it. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe

[PATCH v2 0/5] drm/xe/sriov: Don't migrate dmabuf BO to System RAM while running in VM

2024-10-20 Thread Vivek Kasireddy
rred-primary", TAG+="mutter-device-disable-kms-modifiers" # XDG_SESSION_TYPE=wayland dbus-run-session -- /usr/bin/gnome-shell --wayland --no-x11 & Cc: Michal Wajdeczko Cc: Michał Winiarski Cc: Simona Vetter Cc: Matthew Auld Cc: Matthew Brost Cc: Thomas Hellström Cc: Dongwon

[PATCH v2 5/5] drm/xe/pt: Add an additional check for dmabuf BOs while updating PTEs

2024-10-20 Thread Vivek Kasireddy
on SG iterator (Matt) Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_pt.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index f27f579f4d85..cfa11acbf525 100644 --- a/drivers/gpu/drm/xe/xe_pt.c +++ b/driver

[PATCH v2 3/5] drm/xe/pf: Add a helper function to get a VF's backing object in LMEM

2024-10-20 Thread Vivek Kasireddy
per return the LMEM object instead of the start address. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 23 ++ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 1 + 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_c

[PATCH v2 4/5] drm/xe/bo: Create new dma_addr array for dmabuf BOs associated with VFs

2024-10-20 Thread Vivek Kasireddy
(of type drm_pagemap_dma_addr) and populate it with the new addresses along with the segment sizes. v2: - Use dma_addr array instead of sg table to store translated addresses (Matt) Cc: Matthew Brost Cc: Thomas Hellström Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_bo.c

[PATCH v1 4/5] drm/xe/bo: Create a new sg for dmabuf BOs that are associated with a VF

2024-10-11 Thread Vivek Kasireddy
it with the new addresses. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_bo.c | 108 ++- drivers/gpu/drm/xe/xe_bo_types.h | 6 ++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c

[PATCH v1 5/5] drm/xe/pt: Add an additional check for dmabuf BOs while updating PTEs

2024-10-11 Thread Vivek Kasireddy
If a BO's is_devmem_external flag is set, it means that it is an imported dmabuf BO that has a backing store in VRAM. Therefore, we need to add XE_PPGTT_PTE_DM to the PTE flags as part of vm_bind. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_pt.c | 5 +++-- 1 file chang

[PATCH v1 3/5] drm/xe/pf: Add a helper function to get a VF's starting address in LMEM

2024-10-11 Thread Vivek Kasireddy
VF's region in LMEM. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 23 ++ drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 1 + 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/

[PATCH v1 1/5] PCI/P2PDMA: Don't enforce ACS check for functions of same device

2024-10-11 Thread Vivek Kasireddy
check. Cc: Bjorn Helgaas Cc: Logan Gunthorpe Cc: Signed-off-by: Vivek Kasireddy --- drivers/pci/p2pdma.c | 12 ++-- include/linux/pci.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c index 4f47a13cb500..34bee1ac94f2

[PATCH v1 0/5] drm/xe/sriov: Don't migrate dmabuf BO to System RAM while running in VM

2024-10-11 Thread Vivek Kasireddy
t; # XDG_SESSION_TYPE=wayland dbus-run-session -- /usr/bin/gnome-shell --wayland --no-x11 & Cc: Michal Wajdeczko Cc: Michał Winiarski Cc: Simona Vetter Cc: Matthew Auld Cc: Thomas Hellström Cc: Dongwon Kim Vivek Kasireddy (5): PCI/P2PDMA: Don't enforce ACS check for functions of

[PATCH v1 2/5] drm/xe/dmabuf: Don't migrate BO to System RAM while running in VF mode

2024-10-11 Thread Vivek Kasireddy
If the importer has allow_peer2peer set to true, then we can expect that it would be able to handle VRAM addresses. Therefore, in this specific case and only while running in VF mode, do not migrate the BO to System RAM before exporting it. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/xe

[PATCH] MAINTAINERS: udmabuf: Add myself as co-maintainer for udmabuf driver

2024-08-21 Thread Vivek Kasireddy
etter Signed-off-by: Vivek Kasireddy --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index fa4cab9492a2..af29a75b4a31 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23875,6 +23875,7 @@ F: lib/iov_iter.c USERSPACE DMA BUFFER DRIVER M:

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

2024-08-12 Thread Vivek Kasireddy
hristian Koenig Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Cc: Thomas Hellström Cc: Michal 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

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

2024-08-12 Thread Vivek Kasireddy
Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-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

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

2024-08-12 Thread Vivek Kasireddy
by sending detach_backing cmd. Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_prime.c | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/drivers

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

2024-08-12 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek

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

2024-08-12 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 Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by:

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

2024-08-12 Thread Vivek Kasireddy
from a patch by Dmitry Osipenko . Cc: Gerd Hoffmann Cc: Dmitry Osipenko Cc: Rob Clark Cc: Gurchetan Singh Cc: Chia-I Wu Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h| 5 + drivers/gpu/drm/virtio/virtgpu_object.c | 23 +++ drivers/gpu/drm

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

2024-06-24 Thread Vivek Kasireddy
d0 is virtio-gpu. 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 po

[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
lowing 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 +

[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 +++ driver

[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
: 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
llström Cc: Michal 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 pr

[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
aniel 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.

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

2024-06-24 Thread Vivek Kasireddy
denbrand 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/dri

[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
Dave 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 1

[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 --- a

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

2024-06-24 Thread Vivek Kasireddy
fmann 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/udma

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

2024-06-24 Thread Vivek Kasireddy
w Morton Cc: Oscar Salvador 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: Intro

[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
AP for handling 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/dri

[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
Dave 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 1

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

2024-06-13 Thread Vivek Kasireddy
aniel 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.

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

2024-06-13 Thread Vivek Kasireddy
denbrand 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/dri

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

2024-06-13 Thread Vivek Kasireddy
AP for handling 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/dri

[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
fmann 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/udma

[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 --- a

[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
rd 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_movable_folios() mm/gup: Introduce memfd_pin_folios() for pinning memfd folios udmabuf:

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

2024-04-22 Thread Vivek Kasireddy
lowing 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: V

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

2024-04-22 Thread Vivek Kasireddy
urphy Cc: 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

[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
ff-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/driver

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

2024-04-11 Thread Vivek Kasireddy
aniel 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 dele

[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
denbrand 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
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 --- driver

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

2024-04-11 Thread Vivek Kasireddy
cox (Oracle) Cc: Christoph 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_mov

[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
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 --- driver

[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
Chang 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/udma

[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
aniel 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 chang

[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
ugh 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: Introduce memfd_pin_folios() for pinning memfd folios

[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

  1   2   3   >