Re: [RFC] Make use of non-dynamic dmabuf in RDMA

2021-08-25 Thread Oded Gabbay
On Wed, Aug 25, 2021 at 6:14 PM Christian König wrote: > > Am 25.08.21 um 16:47 schrieb Jason Gunthorpe: > > On Wed, Aug 25, 2021 at 03:51:14PM +0200, Christian König wrote: > >> Am 25.08.21 um 14:38 schrieb Jason Gunthorpe: > >>> On Wed, Aug 25, 2021 at 02:27:08PM +0200, Christian König wrote: >

[PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-05 Thread Oded Gabbay
on a bare-metal environment with IOMMU enabled, on a sky-lake CPU with a white-listed PCIe bridge (to make the pci_p2pdma_distance_many happy). Greg, I hope this will be good enough for you to merge this code. Thanks, Oded Oded Gabbay (1): habanalabs: define uAPI to export FD for DMA-BUF Tome

[PATCH v4 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-07-05 Thread Oded Gabbay
created to match that allocation. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar --- include/uapi/misc/habanalabs.h | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 18765eb75b65

[PATCH v4 2/2] habanalabs: add support for dma-buf exporter

2021-07-05 Thread Oded Gabbay
low p2p. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Gal Pressman Signed-off-by: Oded Gabbay --- Changes in v4: - Using dma_map_resources() to map the physical address of the PCI BAR to a DMA'able address that the other device can use - Check the p2p distance u

Re: [PATCH v4 2/2] habanalabs: add support for dma-buf exporter

2021-07-06 Thread Oded Gabbay
On Mon, Jul 5, 2021 at 7:52 PM Jason Gunthorpe wrote: > > On Mon, Jul 05, 2021 at 04:03:14PM +0300, Oded Gabbay wrote: > > > + rc = sg_alloc_table(*sgt, nents, GFP_KERNEL | __GFP_ZERO); > > + if (rc) > > + goto error_free; > > If you are not g

Re: [PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-06 Thread Oded Gabbay
On Tue, Jul 6, 2021 at 11:40 AM Daniel Vetter wrote: > > On Mon, Jul 05, 2021 at 04:03:12PM +0300, Oded Gabbay wrote: > > Hi, > > I'm sending v4 of this patch-set following the long email thread. > > I want to thank Jason for reviewing v3 and pointing out the errors

Re: [Linaro-mm-sig] [PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-06 Thread Oded Gabbay
On Tue, Jul 6, 2021 at 3:23 PM Daniel Vetter wrote: > > On Tue, Jul 06, 2021 at 02:21:10PM +0200, Christoph Hellwig wrote: > > On Tue, Jul 06, 2021 at 10:40:37AM +0200, Daniel Vetter wrote: > > > > Greg, I hope this will be good enough for you to merge this code. > > > > > > So we're officially go

Re: [Linaro-mm-sig] [PATCH v4 0/2] Add p2p via dmabuf to habanalabs

2021-07-06 Thread Oded Gabbay
On Tue, Jul 6, 2021 at 4:17 PM Daniel Vetter wrote: > > On Tue, Jul 6, 2021 at 2:46 PM Oded Gabbay wrote: > > > > On Tue, Jul 6, 2021 at 3:23 PM Daniel Vetter wrote: > > > > > > On Tue, Jul 06, 2021 at 02:21:10PM +0200, Christoph Hellwig wrote: > > &g

Re: [PATCH v4 2/2] habanalabs: add support for dma-buf exporter

2021-07-06 Thread Oded Gabbay
On Tue, Jul 6, 2021, 16:54 Jason Gunthorpe wrote: > On Tue, Jul 06, 2021 at 12:44:49PM +0300, Oded Gabbay wrote: > > > > > + /* In case we got a large memory area to export, we need to > divide it > > > > + * to smaller areas because each e

[PATCH v5 0/2] Add p2p via dmabuf to habanalabs

2021-07-11 Thread Oded Gabbay
fixes are in the changelog in the commit message of the second patch. There was one issue with your proposal to set the orig_nents to 0. I did that, but I also had to restore it to nents before calling sg_free_table because that function uses orig_nents to iterate. Thanks, Oded Oded Gabb

[PATCH v5 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-07-11 Thread Oded Gabbay
created to match that allocation. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar --- include/uapi/misc/habanalabs.h | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 18765eb75b65

[PATCH v5 2/2] habanalabs: add support for dma-buf exporter

2021-07-11 Thread Oded Gabbay
ance doesn't allow p2p. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Gal Pressman Signed-off-by: Oded Gabbay --- Changes in v5: - Use dma_get_max_seg_size() to get the max segment size of the importer. Use that value when we convert the pages array into an SGT, to

Re: [PATCH v6 04/17] misc/habana: Use FOLL_LONGTERM for userptr

2020-11-21 Thread Oded Gabbay
Cc: Dan Williams > Cc: linux...@kvack.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-samsung-...@vger.kernel.org > Cc: linux-me...@vger.kernel.org > Cc: Oded Gabbay > Cc: Omer Shpigelman > Cc: Ofir Bitton > Cc: Tomer Tayar > Cc: Moti Haimovski > Cc: Da

Re: [PATCH v6 03/17] misc/habana: Stop using frame_vector helpers

2020-11-21 Thread Oded Gabbay
aniel Vetter > Cc: Christoph Hellwig > Cc: Jason Gunthorpe > Cc: Andrew Morton > Cc: John Hubbard > Cc: Jérôme Glisse > Cc: Jan Kara > Cc: Dan Williams > Cc: linux...@kvack.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-samsung-...@vger.kernel.org &

[PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-12 Thread Oded Gabbay
Hi, Re-sending this patch-set following the release of our user-space TPC compiler and runtime library. I would appreciate a review on this. Thanks, Oded Oded Gabbay (1): habanalabs: define uAPI to export FD for DMA-BUF Tomer Tayar (1): habanalabs: add support for dma-buf exporter

[PATCH v6 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-09-12 Thread Oded Gabbay
created to match that allocation. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar Reviewed-by: Greg Kroah-Hartman --- include/uapi/misc/habanalabs.h | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc

[PATCH v6 2/2] habanalabs: add support for dma-buf exporter

2021-09-12 Thread Oded Gabbay
ance doesn't allow p2p. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Gal Pressman Reviewed-by: Greg Kroah-Hartman Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Kconfig | 1 + drivers/misc/habanalabs/common/habanalabs.h | 22 + drivers/m

Re: Accelerator drivers going forward (was Re: Habanalabs Open-Source TPC LLVM compiler and SynapseAI Core library)

2021-09-14 Thread Oded Gabbay
10, 2021 at 6:09 PM Daniel Vetter > > > wrote: > > > > > > > > On Fri, Sep 10, 2021 at 9:58 AM Greg Kroah-Hartman > > > > wrote: > > > > > On Fri, Sep 10, 2021 at 10:26:56AM +0300, Oded Gabbay wrote: > > > > > >

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-14 Thread Oded Gabbay
On Tue, Sep 14, 2021 at 5:18 PM Daniel Vetter wrote: > > On Sun, Sep 12, 2021 at 07:53:07PM +0300, Oded Gabbay wrote: > > Hi, > > Re-sending this patch-set following the release of our user-space TPC > > compiler and runtime library. > > > > I would apprecia

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-15 Thread Oded Gabbay
On Tue, Sep 14, 2021 at 7:12 PM Jason Gunthorpe wrote: > > On Tue, Sep 14, 2021 at 04:18:31PM +0200, Daniel Vetter wrote: > > On Sun, Sep 12, 2021 at 07:53:07PM +0300, Oded Gabbay wrote: > > > Hi, > > > Re-sending this patch-set following the release of our use

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-16 Thread Oded Gabbay
On Thu, Sep 16, 2021 at 3:31 PM Daniel Vetter wrote: > > On Wed, Sep 15, 2021 at 10:45:36AM +0300, Oded Gabbay wrote: > > On Tue, Sep 14, 2021 at 7:12 PM Jason Gunthorpe wrote: > > > > > > On Tue, Sep 14, 2021 at 04:18:31PM +0200, Daniel Vetter wrote: > > &g

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-16 Thread Oded Gabbay
On Thu, Sep 16, 2021 at 3:44 PM Oded Gabbay wrote: > > On Thu, Sep 16, 2021 at 3:31 PM Daniel Vetter wrote: > > > > Maybe I got the device security model all wrong, but I thought Guadi is > > single user, and the only thing it protects is the system against the > &

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-18 Thread Oded Gabbay
On Fri, Sep 17, 2021 at 3:30 PM Daniel Vetter wrote: > > On Thu, Sep 16, 2021 at 10:10:14AM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 16, 2021 at 02:31:34PM +0200, Daniel Vetter wrote: > > > On Wed, Sep 15, 2021 at 10:45:36AM +0300, Oded Gabbay wrote: > > > >

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-23 Thread Oded Gabbay
On Sat, Sep 18, 2021 at 11:38 AM Oded Gabbay wrote: > > On Fri, Sep 17, 2021 at 3:30 PM Daniel Vetter wrote: > > > > On Thu, Sep 16, 2021 at 10:10:14AM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 16, 2021 at 02:31:34PM +0200, Daniel Vetter wrote: > > >

Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-28 Thread Oded Gabbay
On Thu, Sep 23, 2021 at 12:22 PM Oded Gabbay wrote: > > On Sat, Sep 18, 2021 at 11:38 AM Oded Gabbay wrote: > > > > On Fri, Sep 17, 2021 at 3:30 PM Daniel Vetter wrote: > > > > > > On Thu, Sep 16, 2021 at 10:10:14AM -0300, Jason Gunthorpe wrote: > > &g

Re: [PATCH v6 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-09-28 Thread Oded Gabbay
On Tue, Sep 28, 2021 at 8:13 PM Jason Gunthorpe wrote: > > On Sun, Sep 12, 2021 at 07:53:08PM +0300, Oded Gabbay wrote: > > /* HL_MEM_OP_* */ > > __u32 op; > > - /* HL_MEM_* flags */ > > + /* HL_MEM_* flags. > > + * For the HL_MEM_OP

Re: [PATCH v6 2/2] habanalabs: add support for dma-buf exporter

2021-09-28 Thread Oded Gabbay
On Tue, Sep 28, 2021 at 8:36 PM Jason Gunthorpe wrote: > > On Sun, Sep 12, 2021 at 07:53:09PM +0300, Oded Gabbay wrote: > > From: Tomer Tayar > > > > Implement the calls to the dma-buf kernel api to create a dma-buf > > object backed by FD. > > > > We b

Re: [PATCH v6 2/2] habanalabs: add support for dma-buf exporter

2021-09-30 Thread Oded Gabbay
On Wed, Sep 29, 2021 at 12:17 AM Oded Gabbay wrote: > > On Tue, Sep 28, 2021 at 8:36 PM Jason Gunthorpe wrote: > > > > On Sun, Sep 12, 2021 at 07:53:09PM +0300, Oded Gabbay wrote: > > > From: Tomer Tayar > > > > > > Implement the calls to the dma-bu

[PATCH v7 0/2] Add p2p via dmabuf to habanalabs

2021-10-03 Thread Oded Gabbay
Hi, I'm sending v7 after the latest review from Jason. All the changes are detailed in the commit messages. Dave, I'll appreciate if you can also a-b this patchset. Thanks, Oded Oded Gabbay (1): habanalabs: define uAPI to export FD for DMA-BUF Tomer Tayar (1): habanalabs: add s

[PATCH v7 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-10-03 Thread Oded Gabbay
created to match that allocation. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar Reviewed-by: Greg Kroah-Hartman Acked-by: Daniel Vetter --- Changes in v7: - Change the type of the fd variable returned from IOCTL to be __s32 include/uapi/misc/habanalabs.h | 28 +++- 1

[PATCH v7 2/2] habanalabs: add support for dma-buf exporter

2021-10-03 Thread Oded Gabbay
ance doesn't allow p2p. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Gal Pressman Reviewed-by: Greg Kroah-Hartman Acked-by: Daniel Vetter Signed-off-by: Oded Gabbay --- Changes in v7: - rename structure hl_dmabuf_wrapper to hl_dmabuf_priv - remove change that wasn&#x

Re: [PATCH v7 0/2] Add p2p via dmabuf to habanalabs

2021-10-07 Thread Oded Gabbay
On Sun, Oct 3, 2021 at 12:08 PM Oded Gabbay wrote: > > Hi, > I'm sending v7 after the latest review from Jason. > All the changes are detailed in the commit messages. > > Dave, I'll appreciate if you can also a-b this patchset. > > Thanks, > Oded Hi, I w

Re: Habanalabs, Ask for the linux firmware code which loads by coprocesseor

2021-12-09 Thread Oded Gabbay
On Tue, Dec 7, 2021 at 9:19 AM Cai Huoqing wrote: > > Hi Oded Gabbay and habanalabs folks. > > I'm insterested in this kind of AI acceralator. > > After scanning the driver code. > It seems that there are a linux firmware which is loaded by > coprocessor(an slav

[PULL] drm-amdkfd-fixes

2016-08-09 Thread Oded Gabbay
Hi Dave, Just one patch for -rc that fixes a printk format error. Thanks, Oded The following changes since commit 36e9d08b58f44c3a02974c405ccaaa6ecfaf05b8: drm/cirrus: Fix NULL pointer dereference when registering the fbdev (2016-08-09 13:01:47 +1000) are available in the git repository

[PATCH 1/1] MAINTAINERS: update amdkfd maintainer

2019-05-03 Thread Oded Gabbay
amdkfd is now being upstreamed together with the amdgpu driver. Therefore, update the maintainer entry for the driver with the name of the amdgpu driver maintainer. Signed-off-by: Oded Gabbay --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b

[PATCH 0/1] Officialy leaving role as amdkfd maintainer

2019-05-03 Thread Oded Gabbay
. It's been a great time to work with you guys and I learned a lot from you and from other people in the drm community. I'm sure we will work again in the future :) Thanks, Oded Oded Gabbay (1): MAINTAINERS: update amdkfd maintainer MAINTAINERS | 4 ++-- 1 file changed

[PATCH v2] MAINTAINERS: update amdkfd maintainer

2019-07-03 Thread Oded Gabbay
I'm leaving the role of amdkfd maintainer. Therefore, update the relevant entry in the MAINTAINERS file with the name of the new maintainer. Good Luck! Signed-off-by: Oded Gabbay --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTA

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-18 Thread Oded Gabbay
On Fri, Jun 17, 2022 at 8:20 PM Sierra Guiza, Alejandro (Alex) wrote: > > > On 6/17/2022 4:40 AM, David Hildenbrand wrote: > > On 31.05.22 22:00, Alex Sierra wrote: > >> Device memory that is cache coherent from device and CPU point of view. > >> This is used on platforms that have an advanced sys

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-19 Thread Oded Gabbay
On Mon, Jun 20, 2022 at 3:33 AM Alistair Popple wrote: > > > Oded Gabbay writes: > > > On Fri, Jun 17, 2022 at 8:20 PM Sierra Guiza, Alejandro (Alex) > > wrote: > >> > >> > >> On 6/17/2022 4:40 AM, David Hildenbrand wrote: > >> > O

Re: [PATCH v5 01/13] mm: add zone device coherent type memory support

2022-06-20 Thread Oded Gabbay
On Mon, Jun 20, 2022 at 11:50 AM Alistair Popple wrote: > > > Oded Gabbay writes: > > > On Mon, Jun 20, 2022 at 3:33 AM Alistair Popple wrote: > >> > >> > >> Oded Gabbay writes: > >> > >> > On Fri, Jun 17, 2022 at 8:20 PM Sierra

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > > On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > > > > > On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: > > > > > > &g

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 5:50 PM Jason Gunthorpe wrote: > > On Thu, Aug 04, 2022 at 10:43:42AM +0300, Oded Gabbay wrote: > > > After all, memory management services, or common device chars handling > > I can get from other subsystems (e.g. rdma) as well. I'm sure I cou

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 6:04 PM Jeffrey Hugo wrote: > > On 8/4/2022 6:00 AM, Tvrtko Ursulin wrote: > > > > On 04/08/2022 00:54, Dave Airlie wrote: > >> On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > >>> > >>> On Wed, Aug 3, 2022 at 10:04 PM Da

Re: New subsystem for acceleration devices

2022-08-06 Thread Oded Gabbay
On Fri, Aug 5, 2022 at 3:22 AM Jason Gunthorpe wrote: > > On Thu, Aug 04, 2022 at 08:48:28PM +0300, Oded Gabbay wrote: > > > > The flip is true of DRM - DRM is pretty general. I bet I could > > > implement an RDMA device under DRM - but that doesn't mean it shou

Re: New subsystem for acceleration devices

2022-08-06 Thread Oded Gabbay
On Fri, Aug 5, 2022 at 6:03 AM Dave Airlie wrote: > > On Thu, 4 Aug 2022 at 17:44, Oded Gabbay wrote: > > > > On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > > > > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > > > >

Re: New subsystem for acceleration devices

2022-08-07 Thread Oded Gabbay
On Sun, Aug 7, 2022 at 9:43 AM Oded Gabbay wrote: > > On Fri, Aug 5, 2022 at 3:22 AM Jason Gunthorpe wrote: > > > > On Thu, Aug 04, 2022 at 08:48:28PM +0300, Oded Gabbay wrote: > > > > > > The flip is true of DRM - DRM is pretty general. I bet I could > &

Re: New subsystem for acceleration devices

2022-08-08 Thread Oded Gabbay
On Mon, Aug 8, 2022 at 8:46 PM Jason Gunthorpe wrote: > > On Sun, Aug 07, 2022 at 09:43:40AM +0300, Oded Gabbay wrote: > > > 1. If there is a subsystem which is responsible for creating and > > exposing the device character files, then there should be some code > >

Re: FYI: misc: visconti: Toshiba Visconti DSP accelerator driver sample

2022-08-08 Thread Oded Gabbay
On Fri, Aug 5, 2022 at 1:41 PM Yuji Ishikawa wrote: > > Hello Odded > > This is a sample (wip) driver for a DSP found on Toshiba Visconti SoC. > The DSP typically accepts some images, apply an algorithm on them and yields > resulting one. > Therefore (image-in, image-out), they say this driver sh

Re: New subsystem for acceleration devices

2022-08-09 Thread Oded Gabbay
On Sun, Aug 7, 2022 at 9:50 AM Oded Gabbay wrote: > > On Fri, Aug 5, 2022 at 6:03 AM Dave Airlie wrote: > > > > On Thu, 4 Aug 2022 at 17:44, Oded Gabbay wrote: > > > > > > On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > > > > &g

Re: New subsystem for acceleration devices

2022-08-10 Thread Oded Gabbay
On Wed, Aug 10, 2022 at 5:10 PM wrote: > > > -Original Message- > > From: Oded Gabbay > > Sent: Wednesday, August 10, 2022 6:42 AM > > To: Dave Airlie ; Greg Kroah-Hartman > > ; ishikawa yuji(石川 悠司 ○RDC□AITC○ > > EA開) ; Jiho Chu > > Cc: dri-

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

2022-08-21 Thread Oded Gabbay
On Wed, Aug 17, 2022 at 7:11 PM Jason Gunthorpe wrote: > > dma-buf has become a way to safely acquire a handle to non-struct page > memory that can still have lifetime controlled by the exporter. Notably > RDMA can now import dma-buf FDs and build them into MRs which allows for > PCI P2P operation

Re: New subsystem for acceleration devices

2022-08-23 Thread Oded Gabbay
On Tue, Aug 23, 2022 at 9:24 PM Kevin Hilman wrote: > > Hi Obed, > > Oded Gabbay writes: > > [...] > > > I want to update that I'm currently in discussions with Dave to figure > > out what's the best way to move forward. We are writing it down to do &g

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

2022-09-06 Thread Oded Gabbay
On Tue, Sep 6, 2022 at 2:48 PM Jason Gunthorpe wrote: > > On Tue, Sep 06, 2022 at 12:38:44PM +0200, Christian König wrote: > > Am 06.09.22 um 11:51 schrieb Christoph Hellwig: > > > > +{ > > > > + struct vfio_pci_dma_buf *priv = dmabuf->priv; > > > > + int rc; > > > > + > > > > + rc = pci_p2pdma_di

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

2022-09-06 Thread Oded Gabbay
On Tue, Sep 6, 2022 at 8:59 PM Jason Gunthorpe wrote: > > On Tue, Sep 06, 2022 at 03:34:02PM +0300, Oded Gabbay wrote: > > > > > > > + /* > > > > > > + * Since the memory being mapped is a device memory it could > &

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

2022-09-07 Thread Oded Gabbay
On Wed, Sep 7, 2022 at 5:30 PM Christoph Hellwig wrote: > > On Wed, Sep 07, 2022 at 09:33:11AM -0300, Jason Gunthorpe wrote: > > Yes, you said that, and I said that when the AMD driver first merged > > it - but it went in anyhow and now people are using it in a bunch of > > places. > > drm folks m

Re: New subsystem for acceleration devices

2022-09-23 Thread Oded Gabbay
On Mon, Aug 29, 2022 at 11:54 PM Kevin Hilman wrote: > > Hi Oded (and sorry I misspelled your name last time), > > Oded Gabbay writes: > > > On Tue, Aug 23, 2022 at 9:24 PM Kevin Hilman wrote: > >> > >> Hi Obed, > >> > >> Oded Gabbay

Re: New subsystem for acceleration devices

2022-09-28 Thread Oded Gabbay
On Mon, Sep 26, 2022 at 11:16 AM Christoph Hellwig wrote: > > Btw, there is another interesting thing around on the block: > > NVMe Computational Storage devices. Don't be fooled by the name, much > of it is not about neither computation not storage, but it allows to > use the existing NVMe queui

Re: [PATCH hmm] drm/amdkfd: fix a use after free race with mmu_notififer unregister

2019-08-06 Thread Oded Gabbay
On Tue, Aug 6, 2019 at 10:31 AM Christoph Hellwig wrote: > > Btw, who maintains amkfd these days? MAINTAINERS still lists > Oded, but he seems to have moved on to Habanalabs and maintains that > drivers now while not having any action on amdkfd for over a year. I've sent a patch to update the MA

[PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-18 Thread Oded Gabbay
created to match that allocation. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar --- include/uapi/misc/habanalabs.h | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index a47a731e4527

[PATCH v3 2/2] habanalabs: add support for dma-buf exporter

2021-06-18 Thread Oded Gabbay
the user works on physical addresses. Therefore, the user doesn't pass through the kernel driver to allocate memory there. As a result, only for GAUDI we receive from the user a device memory physical address (instead of a handle) and a size. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabb

Re: [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-21 Thread Oded Gabbay
On Mon, Jun 21, 2021 at 5:12 PM Jason Gunthorpe wrote: > > On Mon, Jun 21, 2021 at 03:02:10PM +0200, Greg KH wrote: > > On Mon, Jun 21, 2021 at 02:28:48PM +0200, Daniel Vetter wrote: > > > > Also I'm wondering which is the other driver that we share buffers > > > with. The gaudi stuff doesn't have

Re: [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-21 Thread Oded Gabbay
On Mon, Jun 21, 2021 at 9:27 PM Daniel Vetter wrote: > > On Mon, Jun 21, 2021 at 7:55 PM Jason Gunthorpe wrote: > > On Mon, Jun 21, 2021 at 07:26:14PM +0300, Oded Gabbay wrote: > > > On Mon, Jun 21, 2021 at 5:12 PM Jason Gunthorpe wrote: > > > > > > >

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 9:37 AM Christian König wrote: > > Am 22.06.21 um 01:29 schrieb Jason Gunthorpe: > > On Mon, Jun 21, 2021 at 10:24:16PM +0300, Oded Gabbay wrote: > > > >> Another thing I want to emphasize is that we are doing p2p only > >> through the

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 3:01 PM Jason Gunthorpe wrote: > > On Tue, Jun 22, 2021 at 11:42:27AM +0300, Oded Gabbay wrote: > > On Tue, Jun 22, 2021 at 9:37 AM Christian König > > wrote: > > > > > > Am 22.06.21 um 01:29 schrieb Jason Gunthorpe: > > > >

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 3:15 PM Jason Gunthorpe wrote: > > On Tue, Jun 22, 2021 at 03:04:30PM +0300, Oded Gabbay wrote: > > On Tue, Jun 22, 2021 at 3:01 PM Jason Gunthorpe wrote: > > > > > > On Tue, Jun 22, 2021 at 11:42:27AM +0300, Oded Gabbay wrote: > >

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 6:11 PM Jason Gunthorpe wrote: > > On Tue, Jun 22, 2021 at 04:12:26PM +0300, Oded Gabbay wrote: > > > > 1) Setting sg_page to NULL > > > 2) 'mapping' pages for P2P DMA without going through the iommu > > > 3) Allowing P2P DMA

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 6:28 PM Jason Gunthorpe wrote: > > On Tue, Jun 22, 2021 at 05:24:08PM +0200, Christian König wrote: > > > > > I will take two GAUDI devices and use one as an exporter and one as an > > > > importer. I want to see that the solution works end-to-end, with real > > > > device

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-22 Thread Oded Gabbay
On Tue, Jun 22, 2021 at 6:31 PM Christian König wrote: > > > > Am 22.06.21 um 17:28 schrieb Jason Gunthorpe: > > On Tue, Jun 22, 2021 at 05:24:08PM +0200, Christian König wrote: > > > I will take two GAUDI devices and use one as an exporter and one as an > importer. I want to see that th

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 11:57 AM Christian König wrote: > > Am 22.06.21 um 18:05 schrieb Jason Gunthorpe: > > On Tue, Jun 22, 2021 at 05:48:10PM +0200, Christian König wrote: > >> Am 22.06.21 um 17:40 schrieb Jason Gunthorpe: > >>> On Tue, Jun 22, 2021 at 05:29:01PM +0200, Christian König wrote: >

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 9:24 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 10:57:35AM +0200, Christian König wrote: > > > > > No it isn't. It makes devices depend on allocating struct pages for > > > > their > > > > BARs which is not necessary nor desired. > > > Which dramatically reduces

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > > Can you please explain why it is so important to (allow) access them > > through the CPU ? > > It is not so much important, as it reflects

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-23 Thread Oded Gabbay
On Wed, Jun 23, 2021 at 10:34 PM Jason Gunthorpe wrote: > > On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > > On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > > > > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > >

[git pull] habanalabs pull request for kernel 6.3

2023-01-26 Thread Oded Gabbay
U V1 Moti Haimovski (2): habanalabs: extend fatal messages to contain PCI info habanalabs: enhance info printed on FW load errors Oded Gabbay (6): habanalabs/uapi: move uapi file to drm habanalabs: move driver to accel subsystem habanalabs/gaudi2: update asic regist

Re: [PATCH] [v2] accel: fix CONFIG_DRM dependencies

2023-01-31 Thread Oded Gabbay
g DRM_ACCEL > bool "Compute Acceleration Framework" > - depends on DRM > help > Framework for device drivers of compute acceleration devices, such > as, but not limited to, Machine-Learning and Deep-Learning > @@ -25,3 +26,5 @@ menuconfig DRM_ACCEL > > source "drivers/accel/habanalabs/Kconfig" > source "drivers/accel/ivpu/Kconfig" > + > +endif > -- > 2.39.0 > This patch is: Reviewed-by: Oded Gabbay

Re: [PATCH] drivers: Restore alignment and newline in Makefile

2023-01-31 Thread Oded Gabbay
obj-$(CONFIG_DRM_ACCEL)+= accel/ > -- > 2.34.1 > Reviewed-by: Oded Gabbay

Re: [PATCH drm-next 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-02-06 Thread Oded Gabbay
On Thu, Jan 19, 2023 at 7:24 AM Matthew Brost wrote: > > On Thu, Jan 19, 2023 at 05:04:32AM +0100, Danilo Krummrich wrote: > > On 1/18/23 20:48, Christian König wrote: > > > Am 18.01.23 um 20:17 schrieb Dave Airlie: > > > > On Thu, 19 Jan 2023 at 02:54, Alex Deucher > > > > wrote: > > > > > On W

Re: DRM accel and debugfs/sysfs

2023-02-08 Thread Oded Gabbay
On Wed, Feb 8, 2023 at 8:07 PM Daniel Vetter wrote: > > On Tue, Feb 07, 2023 at 01:17:47PM -0300, Maíra Canal wrote: > > On 2/7/23 12:43, Jeffrey Hugo wrote: > > > On 2/7/2023 4:31 AM, Maíra Canal wrote: > > > > Hi Stanislaw, > > > > > > > > On 2/1/23 12:20, Stanislaw Gruszka wrote: > > > > > Hi >

[PATCH 01/27] habanalabs/gaudi2: increase user interrupt grace time

2023-02-12 Thread Oded Gabbay
handling takes more than expected, and therefore this path should be optimized. Until that happens, let's increase the grace period in order not to reach timeout which will cause user call to be rejected. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- dr

[PATCH 02/27] habanalabs/gaudi: capture RAZWI info only if HW indication detected

2023-02-12 Thread Oded Gabbay
From: Koby Elbaz RAZWI handling routine is called from most EQ events, no matter if a RAZWI happens or not. This fix is added to verify the handler is called only if a real RAZWI indication in HW has been detected. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay

[PATCH 05/27] habanalabs: refactor debugfs init

2023-02-12 Thread Oded Gabbay
Make it easier to later add support for accel device. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/debugfs.c | 129 -- 1 file changed, 68 insertions(+), 61 deletions(-) diff --git a/drivers/accel/habanalabs/common/debugfs.c b/drivers/accel/habanalabs

[PATCH 03/27] habanalabs: split cdev creation to separate function

2023-02-12 Thread Oded Gabbay
Move the cdev creation code from the main hdev init function to a separate function. This will make the code more readable once we add the accel registration code (instead/in addition to legacy cdev). Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 49

[PATCH 06/27] habanalabs: use memhash_node_export_put() in hl_release_dmabuf()

2023-02-12 Thread Oded Gabbay
From: Tomer Tayar The same mutex lock/unlock and counter decrementing in hl_release_dmabuf() is already done in the memhash_node_export_put() helper function. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 89

[PATCH 07/27] habanalabs/gaudi2: fix address decode RAZWI handling

2023-02-12 Thread Oded Gabbay
Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2.c | 724 --- 1 file changed, 371 insertions(+), 353 deletions(-) diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c index

[PATCH 04/27] habanalabs: save class in hdev

2023-02-12 Thread Oded Gabbay
It is more concise than to pass it to device init. Once we will add the accel class, then we won't need to change the function signatures. Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 16 drivers/accel/habanalabs/common/habanalabs.h

[PATCH 11/27] habanalabs/gaudi2: expose engine core int reg address

2023-02-12 Thread Oded Gabbay
Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 3 +++ drivers/accel/habanalabs/common/habanalabs_ioctl.c | 1 + drivers/accel/habanalabs/gaudi2/gaudi2.c | 5 + include/uapi/drm/habanalabs_accel.h| 5 + 4 files changed, 14

[PATCH 10/27] habanalabs: add critical-event bit in notifier

2023-02-12 Thread Oded Gabbay
From: Moti Haimovski Enhance the existing user notifications by adding a HW and FW critical event bits to be used when a HW or FW event occur that requires both SW abort and hard-resetting the chip. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay

[PATCH 08/27] habanalabs: add info when FD released while device still in use

2023-02-12 Thread Oded Gabbay
are checked for now are active CS and exported dma-buf. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../habanalabs/common/command_submission.c| 16 ++ drivers/accel/habanalabs/common/device.c | 51 +-- drivers/accel/habanalabs

[PATCH 15/27] habanalabs: enable graceful reset mechanism for compute-reset

2023-02-12 Thread Oded Gabbay
d-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 26 +++- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c index d140eaefc840..2d496cd93

[PATCH 09/27] habanalabs: enforce release order of compute device and dma-buf

2023-02-12 Thread Oded Gabbay
this constraint, enforce the correct order of release operations inside the driver, by incrementing the device file refcount for any dma-buf until it is released. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 10

[PATCH 14/27] habanalabs: disable PCI when escalating compute to hard-reset

2023-02-12 Thread Oded Gabbay
the FW), then we ask the FW to disable PCI access. We would also like to have relevant debug info and therefore we print the currently escalating reset type. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 16

[PATCH 12/27] habanalabs/gaudi2: unsecure CFG_TPC_ID register

2023-02-12 Thread Oded Gabbay
From: Koby Elbaz Required to allow the TPC compiler to know on which offset of the index space it works on. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/gaudi2/gaudi2_security.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 13/27] habanalabs: minimize error prints when mem map fails

2023-02-12 Thread Oded Gabbay
From: Moti Haimovski This commit minimizes the "chain of errors" displayed when memory mapping fails. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/memory.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[PATCH 20/27] habanalabs/gaudi2: add support for TPC assert

2023-02-12 Thread Oded Gabbay
Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 5 .../habanalabs/common/habanalabs_ioctl.c | 1 + drivers/accel/habanalabs/common/irq.c | 18 + drivers/accel/habanalabs/gaudi/gaudi.c| 1

[PATCH 22/27] habanalabs: remove hl_irq_handler_default()

2023-02-12 Thread Oded Gabbay
From: Tomer Tayar hl_irq_handler_default() is not used and can be removed. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 1 - drivers/accel/habanalabs/common/irq.c| 18 -- 2 files

[PATCH 24/27] habanalabs: rename security function parameters

2023-02-12 Thread Oded Gabbay
From: Koby Elbaz To match their description above the function Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/security.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/accel/habanalabs

[PATCH 18/27] habanalabs: change user interrupt to threaded IRQ

2023-02-12 Thread Oded Gabbay
. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../habanalabs/common/command_submission.c| 45 +-- drivers/accel/habanalabs/common/habanalabs.h | 1 + drivers/accel/habanalabs/common/irq.c | 13 ++ drivers/accel/habanalabs/gaudi2

[PATCH 21/27] habanalabs: fix print in hl_irq_handler_eq()

2023-02-12 Thread Oded Gabbay
From: Tomer Tayar "eq_base[eq->ci].hdr.ctl" is used directly in a print without a le32_to_cpu() conversion. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/irq.c | 7 +++ 1 file changed, 3 insertions(+)

[PATCH 19/27] habanalabs: capture interrupt timestamp in handler

2023-02-12 Thread Oded Gabbay
From: Ofir Bitton In order for interrupt timestamp to be more accurate we should capture it during the interrupt handling rather than in threaded irq context. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 2

[PATCH 17/27] habanalabs/gaudi2: modify events reset policy

2023-02-12 Thread Oded Gabbay
From: Ohad Sharabi The policy file of the events reset has been modified. This change is reflected in the autogenerated file. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- .../gaudi2/gaudi2_async_ids_map_extended.h| 488 +- 1 file

[PATCH 23/27] habanalabs: tiny refactor of hl_device_reset for readability

2023-02-12 Thread Oded Gabbay
From: Dafna Hirschfeld Align assignment of reset_upon_device_release to the convention used in this function. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/device.c | 7 +++ 1 file changed, 3 insertions(+), 4

  1   2   3   4   5   6   7   8   9   10   >