public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Kenneth Lee <Kenneth-Lee-2012@foxmail.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	jonathan.cameron@huawei.com, grant.likely@arm.com,
	jean-philippe <jean-philippe@linaro.org>,
	ilias.apalodimas@linaro.org, francois.ozog@linaro.org,
	Wangzhou <wangzhou1@hisilicon.com>,
	"haojian . zhuang" <haojian.zhuang@linaro.org>,
	Zaibo Xu <xuzaibo@huawei.com>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	Kenneth Lee <liguozhu@hisilicon.com>,
	linux-accelerators@lists.ozlabs.org
Subject: Re: [PATCH v6 2/3] uacce: add uacce driver
Date: Thu, 24 Oct 2019 10:17:59 -0400	[thread overview]
Message-ID: <20191024141759.GA4793@redhat.com> (raw)
In-Reply-To: <20191024064129.GB17723@kllp10>

On Thu, Oct 24, 2019 at 02:41:29PM +0800, Kenneth Lee wrote:
> On Tue, Oct 22, 2019 at 02:49:29PM -0400, Jerome Glisse wrote:
> > Date: Tue, 22 Oct 2019 14:49:29 -0400
> > From: Jerome Glisse <jglisse@redhat.com>
> > To: Zhangfei Gao <zhangfei.gao@linaro.org>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Arnd Bergmann
> >  <arnd@arndb.de>, Herbert Xu <herbert@gondor.apana.org.au>,
> >  jonathan.cameron@huawei.com, grant.likely@arm.com, jean-philippe
> >  <jean-philippe@linaro.org>, ilias.apalodimas@linaro.org,
> >  francois.ozog@linaro.org, kenneth-lee-2012@foxmail.com, Wangzhou
> >  <wangzhou1@hisilicon.com>, "haojian . zhuang" <haojian.zhuang@linaro.org>,
> >  Zaibo Xu <xuzaibo@huawei.com>, linux-kernel@vger.kernel.org,
> >  linux-crypto@vger.kernel.org, Kenneth Lee <liguozhu@hisilicon.com>,
> >  linux-accelerators@lists.ozlabs.org
> > Subject: Re: [PATCH v6 2/3] uacce: add uacce driver
> > Message-ID: <20191022184929.GC5169@redhat.com>
> > 
> > On Wed, Oct 16, 2019 at 04:34:32PM +0800, Zhangfei Gao wrote:
> > > From: Kenneth Lee <liguozhu@hisilicon.com>
> > > 
> > > Uacce (Unified/User-space-access-intended Accelerator Framework) targets to
> > > provide Shared Virtual Addressing (SVA) between accelerators and processes.
> > > So accelerator can access any data structure of the main cpu.
> > > This differs from the data sharing between cpu and io device, which share
> > > data content rather than address.
> > > Since unified address, hardware and user space of process can share the
> > > same virtual address in the communication.
> > > 
> > > Uacce create a chrdev for every registration, the queue is allocated to
> > > the process when the chrdev is opened. Then the process can access the
> > > hardware resource by interact with the queue file. By mmap the queue
> > > file space to user space, the process can directly put requests to the
> > > hardware without syscall to the kernel space.
> > 
> > You need to remove all API that is not use by your first driver as
> > it will most likely bit rot without users. It is way better to add
> > things when a driver start to make use of it.
> 
> Yes. Good point. Thank you:)
> 
> > 
> > I am still not convince of the value of adding a new framework here
> > with only a single device as an example. It looks similar to some of
> > the fpga devices. Saddly because framework layering is not something
> > that exist i guess inventing a new framework is the only answer when
> > you can not quite fit into an existing one.
> > 
> > More fundamental question is why do you need to change the IOMMU
> > domain of the device ? I do not see any reason for that unless the
> > PASID has some restriction on ARM that i do not know of.
> 
> But I think this is the only way. As my understanding, by default, the
> system creates a DMA IOMMU domain for each device behine an IOMMU. If
> you want to call iommu interface directly, we have to rebind the device
> to an unmanaged domain.

Why would you need to call iommu directly ? On some GPUs we do use
PASID and we do not rebind to different domain, we just don't mess
with that. So i do not see any reason to change the domain.

Cheers,
Jérôme


  parent reply	other threads:[~2019-10-24 14:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16  8:34 [PATCH v6 0/3] Add uacce module for Accelerator Zhangfei Gao
2019-10-16  8:34 ` [PATCH v6 1/3] uacce: Add documents for uacce Zhangfei Gao
2019-10-16 18:36   ` Jean-Philippe Brucker
     [not found]     ` <5da81d06.1c69fb81.395d6.c080SMTPIN_ADDED_BROKEN@mx.google.com>
2019-10-21 13:34       ` Jean-Philippe Brucker
2019-10-16  8:34 ` [PATCH v6 2/3] uacce: add uacce driver Zhangfei Gao
2019-10-16 17:28   ` Jean-Philippe Brucker
     [not found]     ` <5da9a9cd.1c69fb81.9f8e8.60faSMTPIN_ADDED_BROKEN@mx.google.com>
2019-10-23  7:42       ` Jean-Philippe Brucker
2019-10-23 17:03         ` Jerome Glisse
     [not found]         ` <5db25e56.1c69fb81.4fe57.380cSMTPIN_ADDED_BROKEN@mx.google.com>
2019-10-25  7:35           ` Jean-Philippe Brucker
2019-10-23 16:58     ` Jerome Glisse
     [not found]       ` <5db257c6.1c69fb81.bfe34.a4afSMTPIN_ADDED_BROKEN@mx.google.com>
2019-10-25  7:04         ` Jean-Philippe Brucker
2019-10-22 18:49   ` Jerome Glisse
     [not found]     ` <20191024064129.GB17723@kllp10>
2019-10-24 14:17       ` Jerome Glisse [this message]
2019-10-25  7:01     ` zhangfei
2019-10-16  8:34 ` [PATCH v6 3/3] crypto: hisilicon - register zip engine to uacce Zhangfei Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024141759.GA4793@redhat.com \
    --to=jglisse@redhat.com \
    --cc=Kenneth-Lee-2012@foxmail.com \
    --cc=arnd@arndb.de \
    --cc=francois.ozog@linaro.org \
    --cc=grant.likely@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jean-philippe@linaro.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-accelerators@lists.ozlabs.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuzaibo@huawei.com \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox