Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp31306ybl; Thu, 15 Aug 2019 12:05:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwytPoVC+i4rG4DJSwsmtVfJd/zVxR2FWEZvgxgl7f+HR5W2WQS2gGE4MfoEcVkjuaoDerv X-Received: by 2002:a17:902:6507:: with SMTP id b7mr5470413plk.271.1565895952568; Thu, 15 Aug 2019 12:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565895952; cv=none; d=google.com; s=arc-20160816; b=Owp5z8VNgOdSz+KySrwyRNtWP8iM1okMCYnMDyEHHTosyPVB8amcIkby7OD9W2DLi2 cd7eLlQbxjKKNbqOAr26viZrj07T3K5sNJPmzkCVAic2/XrLAe/TdPuyqktw0HdGjk1G pO2g6YTrSVS5C/xQfNo/fOgjo+NM1LYPP9G5DCz2cT72atzUEzkkaXKw6hjAtfTTxORk 28OPHauR+jcPR1G0EUNmutNBcSPGe58LClgMZ/JvPM4l3Z+IDJr3Gj1rB2f0pjN67TNR Z8lSEXJ6tYmFWWhGN9Ie2gYtWne1GrukC1M6xjzI2QpdZUOnjful7Tb+4bMyMfeOaQlU sqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TOriyjISQ6NsdXIdqOb/4ieu/vsnKnbJ2fr1+/Iwzzk=; b=U7c3XQAUXGppoXIemlICYVY/xy/L77/0H4eo0QXOZnWaL2nylPg/pYtoPusDnLh5G4 Vt1pHmJfHMPg8UlQE0jF3tdtSoXXu6QB/0YErgqAjausVD4+ETRTwTmVMBeCbVDquzHc AsXVCeyHM2dREambeEVGOd9eSRaZ8V6e/sN3XfscuzFYR+T8+Xehx7ELP35m8nPnC0sx UxGEVZibA1NBw3/xmFdWY70kmZvgW+NbsVTIk/KYA1MVocgvp/0gsbpaZ+y3J0TrkZop 0Rhjb7VOKoeoMjAXctmYnm4WWG+kWj+IZPpD8MZJDFmIkxJc7E6hKtL2qKSrZXRz08wE C2vA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si2443801plr.388.2019.08.15.12.05.35; Thu, 15 Aug 2019 12:05:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731144AbfHORE1 (ORCPT + 99 others); Thu, 15 Aug 2019 13:04:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfHORE1 (ORCPT ); Thu, 15 Aug 2019 13:04:27 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC48D51EE1; Thu, 15 Aug 2019 17:04:26 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.178]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 512EF43FD5; Thu, 15 Aug 2019 17:04:26 +0000 (UTC) Date: Thu, 15 Aug 2019 13:04:24 -0400 From: Jerome Glisse To: Zhangfei Gao Cc: Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-accelerators@lists.ozlabs.org Subject: Re: [PATCH 0/2] A General Accelerator Framework, WarpDrive Message-ID: <20190815170424.GA30916@redhat.com> References: <1565775265-21212-1-git-send-email-zhangfei.gao@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1565775265-21212-1-git-send-email-zhangfei.gao@linaro.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 15 Aug 2019 17:04:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 05:34:23PM +0800, Zhangfei Gao wrote: > *WarpDrive* is a general accelerator framework for the user application to > access the hardware without going through the kernel in data path. > > WarpDrive is the name for the whole framework. The component in kernel > is called uacce, meaning "Unified/User-space-access-intended Accelerator > Framework". It makes use of the capability of IOMMU to maintain a > unified virtual address space between the hardware and the process. > > WarpDrive is intended to be used with Jean Philippe Brucker's SVA > patchset[1], which enables IO side page fault and PASID support. > We have keep verifying with Jean's sva/current [2] > We also keep verifying with Eric's SMMUv3 Nested Stage patch [3] > > This series and related zip & qm driver as well as dummy driver for qemu test: > https://github.com/Linaro/linux-kernel-warpdrive/tree/5.3-rc1-warpdrive-v1 > zip driver already been upstreamed. > zip supporting uacce will be the next step. > > The library and user application: > https://github.com/Linaro/warpdrive/tree/wdprd-v1-current Do we want a new framework ? I think that is the first question that should be answer here. Accelerator are in many forms and so far they never have been enough commonality to create a framework, even GPUs with the drm is an example of that, drm only offer share framework for the modesetting part of the GPU (as thankfully monitor connector are not specific to GPU brands :)) FPGA is another example the only common code expose to userspace is about bitstream management AFAIK. I would argue that a framework should only be created once there is enough devices with same userspace API. Meanwhile you can provide in kernel helper that allow driver to expose same API. If after a while we have enough device driver which all use that same in kernel helpers API then it will a good time to introduce a new framework. Meanwhile this will allow individual device driver to tinker with their API and maybe get to something useful to more devices in the end. Note that what i propose also allow userspace code sharing for all driver that use the same in kernel helper. Cheers, J?r?me