[PATCH 2/4] dma-buf: Add dma_buf_try_get()

2024-12-17 Thread Wei Lin Guay
-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- include/linux/dma-buf.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 36216d28d8bd..9854578af

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

2024-12-17 Thread Wei Lin Guay
d-off-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- drivers/vfio/pci/Makefile | 1 + drivers/vfio/pci/dma_buf.c | 269 + drivers/vfio/pci/vfio_pci_config.c | 8 +- d

[PATCH 4/4] vfio/pci: Allow export dmabuf without move_notify from importer

2024-12-17 Thread Wei Lin Guay
From: Wei Lin Guay Summary: Support vfio to export dmabuf to importer such as RDMA NIC that does not support move_notify callback, since not all RDMA driver support on-demand-paging (ODP). There are some use-cases such as bind accelerator that always pinned the device memory via vfio and export

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

2024-12-17 Thread Wei Lin Guay
d-off-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- drivers/vfio/pci/Makefile | 1 + drivers/vfio/pci/dma_buf.c | 269 + drivers/vfio/pci/vfio_pci_config.c | 8 +- d

[PATCH 4/4] vfio/pci: Allow export dmabuf without move_notify from importer

2024-12-17 Thread Wei Lin Guay
From: Wei Lin Guay Summary: Support vfio to export dmabuf to importer such as RDMA NIC that does not support move_notify callback, since not all RDMA driver support on-demand-paging (ODP). There are some use-cases such as bind accelerator that always pinned the device memory via vfio and export

[PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2024-12-17 Thread Wei Lin Guay
From: Wei Lin Guay This is another attempt to revive the patches posted by Jason Gunthorpe and Vivek Kasireddy, at https://patchwork.kernel.org/project/linux-media/cover/0-v2-472615b3877e+28f7-vfio_dma_buf_...@nvidia.com/ https://lwn.net/Articles/970751/ In addition to the initial proposal by

[PATCH 2/4] dma-buf: Add dma_buf_try_get()

2024-12-17 Thread Wei Lin Guay
-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- include/linux/dma-buf.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 36216d28d8bd..9854578af

[PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2024-12-17 Thread Wei Lin Guay
From: Wei Lin Guay This is another attempt to revive the patches posted by Jason Gunthorpe and Vivek Kasireddy, at https://patchwork.kernel.org/project/linux-media/cover/0-v2-472615b3877e+28f7-vfio_dma_buf_...@nvidia.com/ https://lwn.net/Articles/970751/ In addition to the initial proposal by

[PATCH 1/4] vfio: Add vfio_device_get()

2024-12-17 Thread Wei Lin Guay
From: Jason Gunthorpe Summary: To increment a reference the caller already holds. Export vfio_device_put() to pair with it. Signed-off-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- drivers/vfio/vfio_main.c | 1

[PATCH 1/4] vfio: Add vfio_device_get()

2024-12-17 Thread Wei Lin Guay
From: Jason Gunthorpe Summary: To increment a reference the caller already holds. Export vfio_device_put() to pair with it. Signed-off-by: Jason Gunthorpe Signed-off-by: Wei Lin Guay Reviewed-by: Dag Moxnes Reviewed-by: Keith Busch Reviewed-by: Nic Viljoen --- drivers/vfio/vfio_main.c | 1

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2024-12-18 Thread Wei Lin Guay
Hi Christian, Thanks again for your prompt response/review. > On 17 Dec 2024, at 10:53, Christian König wrote: > > > > Am 16.12.24 um 17:54 schrieb Keith Busch: >> On Mon, Dec 16, 2024 at 11:21:39AM +0100, Christian König wrote: >>> Am 16.12.24 um 10:54 schrie

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2024-12-18 Thread Wei Lin Guay
Hi Vivek, > On 16 Dec 2024, at 18:34, Kasireddy, Vivek wrote: > > > > Hi Wei Lin, > >> Subject: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported >> through dmabuf >> >> From: Wei Lin Guay >> >> This is another attempt to rev

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2025-02-24 Thread Wei Lin Guay
Hi Vivek, On 18 Dec 2024, at 08:02, Kasireddy, Vivek wrote: Hi Wei Lin, Subject: Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf From: Wei Lin Guay This is another attempt to revive the patches posted by Jason Gunthorpe and Vivek Kasireddy, at https

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2025-02-27 Thread Wei Lin Guay
>> >> doorbell using PCI P2P. >> >> However, as a general mechanism, it can support >> many other scenarios >> >> >> with >> >> >> VFIO. I imagine this dmabuf approach to be >> usable by iommufd as well for >> generic an

Re: [PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf

2025-02-27 Thread Wei Lin Guay
> On 26 Feb 2025, at 18:59, Leon Romanovsky wrote: > > > > On Wed, Feb 26, 2025 at 09:38:22AM -0400, Jason Gunthorpe wrote: >> On Wed, Feb 26, 2025 at 07:55:07AM +, Kasireddy, Vivek wrote: >> Is there any update or ETA for the v3? Are there any ways we can help? >> >>> I believe Le