From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BD7BC433FE for ; Fri, 10 Dec 2021 12:42:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241180AbhLJMpq (ORCPT ); Fri, 10 Dec 2021 07:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241203AbhLJMpl (ORCPT ); Fri, 10 Dec 2021 07:45:41 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8615FC061A32 for ; Fri, 10 Dec 2021 04:42:06 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id m17so7851387qvx.8 for ; Fri, 10 Dec 2021 04:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=eO1oR3bssJVHG9Y26Y6bMlgt2qf5AyUrhg5Krs2dEgs=; b=nDHGUjCVp/Nzed1y5hlgRbG1rB1VpqFejneQkFUgnd/dOKi9xhgwHQdeHAU7UDO7dL LrYc4w9gGDZHDdSVQdmKeccT3bIBJv7XQs872y9Y9XmBMpsEqHghVBMYh1Jti+XjO52O 5oG93oP6lP3YQYxXNywJisYGEi+hLH2uCUqTDaIh/Q1JWkkeuNkYpct45+7o7lGV0wEW xOqVnUOjCMIJRJDI3rkolyOSf0l2vFrO32O8YRFCag4oY1wM7wZGDFAM59KpogZqZPpm Iwzd5dUmyO/Y3bq4AshpPEOuX7z2kNyU7O/xsL9Dfv6wYok7wZgOUM+bfh0yRBCNlwSa QzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=eO1oR3bssJVHG9Y26Y6bMlgt2qf5AyUrhg5Krs2dEgs=; b=kNw3Z1iAiDh05jRqRI21JSWlwcorQcBvA4l+uMn4FK6UsM2xBOBgRWU+h1mkKJHpvl cdMp5dR8a8lfsdJBsA/msEAJdBk1gQOlMHlLs43sm32dLYUk5oeU6Yv/8J2tgeIZuz8Y SqtvxeHOMBWaiQtx2K8XGCa2yPi59no2TddWAy400OtFktRVotYjRmFjSe3YbRS6jlMl frGz85qskQQhghfIZ19FO3U4wm2kTXUV9fcaZnD60B8EgKkZyf3Q3gLtlRsHTuXAqnCm BYdVFwRGeIfQPcEj/i4l1iWIPxBGEtMX04eRvbtUioZzaPghSwRKyAm4kcXL1Yvqdfel fUew== X-Gm-Message-State: AOAM531uvRXxQGaGlTsBwLwf04/MX9gEpR3kEY8hT6cB3n03CLiqx8eu Nwq5y3+AxJTO69lqnRFx8rjgRw== X-Google-Smtp-Source: ABdhPJzRWU9mGRPVsRFVZCG14NYr/la8f9ijUEtK7ktXons/NVCP2JFtcdHPZxBHFIA6Sx/+qJ1MWA== X-Received: by 2002:a0c:f6c5:: with SMTP id d5mr24246637qvo.111.1639140125710; Fri, 10 Dec 2021 04:42:05 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id n6sm1766301qtx.88.2021.12.10.04.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 04:42:05 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mvfDw-001eiM-2r; Fri, 10 Dec 2021 08:42:04 -0400 Date: Fri, 10 Dec 2021 08:42:04 -0400 From: Jason Gunthorpe To: Shunsuke Mie Cc: Zhu Yanjun , Christian =?utf-8?B?S8O2bmln?= , Alex Deucher , Daniel Vetter , Doug Ledford , Jianxin Xiong , Leon Romanovsky , Maor Gottlieb , Sean Hefty , Sumit Semwal , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, Linux Kernel Mailing List , linux-rdma , Damian Hobson-Garcia , Takanari Hayama , Tomohito Esaki Subject: Re: [RFC PATCH v4 0/2] RDMA/rxe: Add dma-buf support Message-ID: <20211210124204.GG6467@ziepe.ca> References: <20211122110817.33319-1-mie@igel.co.jp> <20211207171447.GA6467@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Fri, Dec 10, 2021 at 08:29:24PM +0900, Shunsuke Mie wrote: > Hi Jason, > Thank you for replying. > > 2021年12月8日(水) 2:14 Jason Gunthorpe : > > > > On Fri, Dec 03, 2021 at 12:51:44PM +0900, Shunsuke Mie wrote: > > > Hi maintainers, > > > > > > Could you please review this patch series? > > > > Why is it RFC? > > > > I'm confused why this is useful? > > > > This can't do copy from MMIO memory, so it shouldn't be compatible > > with things like Gaudi - does something prevent this? > I think if an export of the dma-buf supports vmap, CPU is able to access the > mmio memory. > > Is it wrong? If this is wrong, there is no advantages this changes.. I don't know what the dmabuf folks did, but yes, it is wrong. IOMEM must be touched using only special accessors, some platforms crash if you don't do this. Even x86 will crash if you touch it with something like an XMM optimized memcpy. Christian? If the vmap succeeds what rules must the caller use to access the memory? Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92B4EC433EF for ; Fri, 10 Dec 2021 12:42:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A04FE10E299; Fri, 10 Dec 2021 12:42:07 +0000 (UTC) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by gabe.freedesktop.org (Postfix) with ESMTPS id B185410E27D for ; Fri, 10 Dec 2021 12:42:06 +0000 (UTC) Received: by mail-qv1-xf2c.google.com with SMTP id p3so7836523qvj.9 for ; Fri, 10 Dec 2021 04:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=eO1oR3bssJVHG9Y26Y6bMlgt2qf5AyUrhg5Krs2dEgs=; b=nDHGUjCVp/Nzed1y5hlgRbG1rB1VpqFejneQkFUgnd/dOKi9xhgwHQdeHAU7UDO7dL LrYc4w9gGDZHDdSVQdmKeccT3bIBJv7XQs872y9Y9XmBMpsEqHghVBMYh1Jti+XjO52O 5oG93oP6lP3YQYxXNywJisYGEi+hLH2uCUqTDaIh/Q1JWkkeuNkYpct45+7o7lGV0wEW xOqVnUOjCMIJRJDI3rkolyOSf0l2vFrO32O8YRFCag4oY1wM7wZGDFAM59KpogZqZPpm Iwzd5dUmyO/Y3bq4AshpPEOuX7z2kNyU7O/xsL9Dfv6wYok7wZgOUM+bfh0yRBCNlwSa QzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=eO1oR3bssJVHG9Y26Y6bMlgt2qf5AyUrhg5Krs2dEgs=; b=Md6ZiP1VmZdAMd0gu2ODJ7oC71rqj7F9WKgzLkH+nfZaSJlzgjIdGQviz+5/eWLRDH SQXLcxswiYS2ww2vbgkDC107wYF+rU9bVyQLHgU+QYi4TjSQM7E54zoYLWyRrRraYNQB WDQ6e/h3xgr49wxpvEOMS+HJCPD4vBlJhz6GEr80wq9VgG1vM4oeW8X/lHGSbe3wri8X Mk53vIceMeg+SNy9q0GcIFJg62o2rFElj5YvgWjXu/bA7UMO6zAToi4x9uMHN851UGYc CT045MtZLEbQgPBZQHMyllN+adlghJNPLFfRJ9OxXuDQkoksaYLgrGV911iV9WOzzhVk K9IQ== X-Gm-Message-State: AOAM532dF6iGvVp0NXVZWfxRIVMs4/iqcA9asSCGys24htRTS3toFaj6 1h7AuMBGuj1QOwwlp5aLveooqQ== X-Google-Smtp-Source: ABdhPJzRWU9mGRPVsRFVZCG14NYr/la8f9ijUEtK7ktXons/NVCP2JFtcdHPZxBHFIA6Sx/+qJ1MWA== X-Received: by 2002:a0c:f6c5:: with SMTP id d5mr24246637qvo.111.1639140125710; Fri, 10 Dec 2021 04:42:05 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id n6sm1766301qtx.88.2021.12.10.04.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 04:42:05 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mvfDw-001eiM-2r; Fri, 10 Dec 2021 08:42:04 -0400 Date: Fri, 10 Dec 2021 08:42:04 -0400 From: Jason Gunthorpe To: Shunsuke Mie Subject: Re: [RFC PATCH v4 0/2] RDMA/rxe: Add dma-buf support Message-ID: <20211210124204.GG6467@ziepe.ca> References: <20211122110817.33319-1-mie@igel.co.jp> <20211207171447.GA6467@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damian Hobson-Garcia , Takanari Hayama , Leon Romanovsky , linux-rdma , Daniel Vetter , Tomohito Esaki , Linux Kernel Mailing List , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Doug Ledford , Zhu Yanjun , Alex Deucher , Sean Hefty , Maor Gottlieb , Christian =?utf-8?B?S8O2bmln?= , Jianxin Xiong , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Dec 10, 2021 at 08:29:24PM +0900, Shunsuke Mie wrote: > Hi Jason, > Thank you for replying. > > 2021年12月8日(水) 2:14 Jason Gunthorpe : > > > > On Fri, Dec 03, 2021 at 12:51:44PM +0900, Shunsuke Mie wrote: > > > Hi maintainers, > > > > > > Could you please review this patch series? > > > > Why is it RFC? > > > > I'm confused why this is useful? > > > > This can't do copy from MMIO memory, so it shouldn't be compatible > > with things like Gaudi - does something prevent this? > I think if an export of the dma-buf supports vmap, CPU is able to access the > mmio memory. > > Is it wrong? If this is wrong, there is no advantages this changes.. I don't know what the dmabuf folks did, but yes, it is wrong. IOMEM must be touched using only special accessors, some platforms crash if you don't do this. Even x86 will crash if you touch it with something like an XMM optimized memcpy. Christian? If the vmap succeeds what rules must the caller use to access the memory? Jason