Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2719294ybt; Mon, 22 Jun 2020 05:29:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK5vtOIs/aMafyrOmYLCt4n49IA6ha63bTAsxa1zznbJ8987QqHL+zMjFYfTGTxiyz5c1K X-Received: by 2002:a17:906:7fc8:: with SMTP id r8mr6497307ejs.412.1592828969632; Mon, 22 Jun 2020 05:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592828969; cv=none; d=google.com; s=arc-20160816; b=RWItl6a/kzZO8Ak4sR/9RSzmK7t5XGPUa5c9H9DO+zyFGagdHWRie5wEDFe6Eu/NrL 0NXNjHGxw//DjZ5OWCLJ90a4YN01QJEMggr2gWR+cyodw21/qLgDDWlw+cvkR+UFljXn 6jfHx3vL2/n5S0lsgD4GyUpYGDMDMmUH85kT/ns9LXzt7DrOQldpfddOqZvcFpsHivre tWUm7QWH2PiBblOdRQ5WhzapKeo/py1fNCks5z00dz/ZX89YyxOBOv9upUM5lPzlaWfK gQhjdonKq+pRjx1BR6jQB82l2+OzQkeUkQuNtnpichVHeYnB4A01+vx5bB3tbrKwx6e9 QCPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BRfwCdLw+lBhNQtLxGKp6oI5intMTV4VxPqzaekWRpw=; b=MxlDvQIVp/KcsvXCIltqBbL+A/SvB23ym7ScoPxeu8TjFoliCYKsCDs5J9E/2KHl6T vbMayEZvmOQjjOa0nwE+tYCDy/YtOXmm++DMrcT4ye7oRuiCKCWIt96lAcu476SNACMB 5dWlGhNTuoouJpJBTATAlwuxFLPLXI8cJVaRjTWeDVYTBm05KV5EKCWuZttNYzpm/EmE D1jkmp+26Mx5bJCqMaAaQ1NUmsF658j1gp0U5dgP4BqiMIblV2Lzg7gNlrdTuM4xcj72 B/qJiPtZ3D7TDZYkty8pa3+cP7CiS5ek1d5l277gNxqTecP8n9+XXOva9ISR8+gOhI3A RZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=frf3ht8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si9389501edp.396.2020.06.22.05.29.06; Mon, 22 Jun 2020 05:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=frf3ht8X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbgFVM1Y (ORCPT + 99 others); Mon, 22 Jun 2020 08:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728044AbgFVM1Y (ORCPT ); Mon, 22 Jun 2020 08:27:24 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9760C061794; Mon, 22 Jun 2020 05:27:23 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id l188so2183821qkf.10; Mon, 22 Jun 2020 05:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BRfwCdLw+lBhNQtLxGKp6oI5intMTV4VxPqzaekWRpw=; b=frf3ht8XWmKO5bV4tGgU699ueXhbUG1Bs/wG77NbgVGaUlfPmHu9yEGG6nkTVxk8Oq fSJgwEksfQDgTemix2H0rhOoECWZFyijjl8ddbUG35Q3bRzl047kT32V6EaKwVtCFF+R omqcsThto5ndWEYwCmTZcbJE+TTywmmleD0FV+IzyBJWuxbOhgnA8/mblUBbfkO9rlN0 ADCjY+VxOrXexGxUOGklhvBKLZKLPqeDeqVFR5hOPx+TQysamwJmhy962hvAoq1mRxrL y8cp3rw8z5DteqYsV+Rbe8vNAt7s64ttaU4AhAd0Iz7eAJpsxBpHnjLZ05wi0b0p+3Pp zyQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BRfwCdLw+lBhNQtLxGKp6oI5intMTV4VxPqzaekWRpw=; b=DClaWo+zoqyj+EaFufd/rmbvLu5RT4Hv1+iPf3m2sjESfuQnY4aC1l0UlyH2MgX2Kg oMvlLWaWvvWaw1Tx8hSNPdEc444AiBUvMHyn1Imc54RlAo4Snas+bm1lKITxXQt2mTzQ odltMFWyiCSmSmvP20Lbv/Uo7h1CheOP4Il0uDO4w/64KmkR+gUsNEcM7BaCPYYcqXMh JJpdUBtMmTG/dW+SCz2nQZw/jK7WKKTTExXgly7xej/g2ib2PdVakHqYRAvmDQ53EoMT FICsYMDq3SQ68PZd23nJpr6qc7XeDzeqB/i+EttJOu1zVS8o2So/N2JDDlKiYhZqaKDl mSAw== X-Gm-Message-State: AOAM532mmpvKHdSqGZ3LwEp/+skDOvHbn1qW9fNRjOisOldruc93RCYD agFshf3rMeqGn05CFH6WNJvk/t72UsmDcuoEdsU= X-Received: by 2002:a37:9942:: with SMTP id b63mr15775646qke.370.1592828843080; Mon, 22 Jun 2020 05:27:23 -0700 (PDT) MIME-Version: 1.0 References: <5614531.lOV4Wx5bFT@harkonnen> <20200621072457.GA2324254@vkoul-mobl> <20200621203634.y3tejmh6j4knf5iz@cwe-513-vol689.cern.ch> <20200622044733.GB2324254@vkoul-mobl> <419762761.402939.1592827272368@mailbusiness.ionos.de> In-Reply-To: <419762761.402939.1592827272368@mailbusiness.ionos.de> From: Richard Weinberger Date: Mon, 22 Jun 2020 14:27:12 +0200 Message-ID: Subject: Re: DMA Engine: Transfer From Userspace To: Thomas Ruf Cc: Vinod Koul , Federico Vaga , Dave Jiang , Dan Williams , dmaengine@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 22, 2020 at 2:02 PM Thomas Ruf wrote: > > more the reason not do do so, why cant a kernel driver be added for your > > usage? > > by chance i have written a driver allowing dma from user space using a memcpy like interface ;-) > now i am trying to get this code upstream but was hit by the fact that DMA_SG is gone since Aug 2017 :-( > > just let me introduce myself and the project: > - coding in C since '91 > - coding in C++ since '98 > - a lot of stuff not relevant for this ;-) > - working as a freelancer since Nov '19 > - implemented a "dma-sg-proxy" driver for my client in Mar/Apr '20 to copy camera frames from uncached memory to cached memory using a second dma on a Zynq platform > - last week we figured out that we can not upgrade from "Xilinx 2019.2" (kernel 4.19.x) to "2020.1" (kernel 5.4.x) because the DMA_SG interface is gone > - subscribed to dmaengine on friday, saw the start of this discussion on saturday > - talked to my client today if it is ok to try to revive DMA_SG and get our driver upstream to avoid such problems in future How do you preserve bounds? This is the main reason why vfio requires an iommu. > here the struct for the ioctl: > > typedef struct { > unsigned int struct_size; > const void *src_user_ptr; > void *dst_user_ptr; > unsigned long length; > unsigned int timeout_in_ms; > } dma_sg_proxy_arg_t; Is this on top of uio or a complete new subsystem? -- Thanks, //richard