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 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBF29C433E6 for ; Tue, 2 Feb 2021 00:22:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E3E7B64DB1 for ; Tue, 2 Feb 2021 00:22:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3E7B64DB1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 517666B0005; Mon, 1 Feb 2021 19:22:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C8A06B0006; Mon, 1 Feb 2021 19:22:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B60F6B006E; Mon, 1 Feb 2021 19:22:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 24B496B0005 for ; Mon, 1 Feb 2021 19:22:09 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E23B58249980 for ; Tue, 2 Feb 2021 00:22:08 +0000 (UTC) X-FDA: 77771425536.04.net40_0007d12275c6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id C7387800ABDA for ; Tue, 2 Feb 2021 00:22:08 +0000 (UTC) X-HE-Tag: net40_0007d12275c6 X-Filterd-Recvd-Size: 4260 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 00:22:07 +0000 (UTC) Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4DV57c4Zd1z5NS2; Tue, 2 Feb 2021 08:20:44 +0800 (CST) Received: from dggpemm500009.china.huawei.com (7.185.36.225) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 2 Feb 2021 08:22:01 +0800 Received: from dggemi761-chm.china.huawei.com (10.1.198.147) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Tue, 2 Feb 2021 08:22:01 +0800 Received: from dggemi761-chm.china.huawei.com ([10.9.49.202]) by dggemi761-chm.china.huawei.com ([10.9.49.202]) with mapi id 15.01.2106.006; Tue, 2 Feb 2021 08:22:01 +0800 From: "Song Bao Hua (Barry Song)" To: Jason Gunthorpe , "Tian, Kevin" CC: "chensihang (A)" , Arnd Bergmann , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-mm@kvack.org" , Zhangfei Gao , "Liguozhu (Kenneth)" , "linux-accelerators@lists.ozlabs.org" Subject: RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device Thread-Topic: [RFC PATCH v2] uacce: Add uacce_ctrl misc device Thread-Index: AQHW8vWniUnMS+RFOU2UJJCa8sDlvKo39q+AgADtcaD//5AFgIAAh9tQ//+YwwCAAIUv4IAEx5CAgAWazQCAAI200A== Date: Tue, 2 Feb 2021 00:22:01 +0000 Message-ID: <845380ee1cab4be9b1b4a1af3f0f7712@hisilicon.com> References: <1611563696-235269-1-git-send-email-wangzhou1@hisilicon.com> <20210125154717.GW4605@ziepe.ca> <96b655ade2534a65974a378bb68383ee@hisilicon.com> <20210125231619.GY4605@ziepe.ca> <5f64a68042c64f37b5cba74028bd2189@hisilicon.com> <20210126011304.GZ4605@ziepe.ca> <20210201234424.GI4718@ziepe.ca> In-Reply-To: <20210201234424.GI4718@ziepe.ca> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.126.202.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > -----Original Message----- > From: Jason Gunthorpe [mailto:jgg@ziepe.ca] > Sent: Tuesday, February 2, 2021 12:44 PM > To: Tian, Kevin > Cc: Song Bao Hua (Barry Song) ; chensihang (A= ) > ; Arnd Bergmann ; Greg > Kroah-Hartman ; linux-kernel@vger.kernel.org; > iommu@lists.linux-foundation.org; linux-mm@kvack.org; Zhangfei Gao > ; Liguozhu (Kenneth) ; > linux-accelerators@lists.ozlabs.org > Subject: Re: [RFC PATCH v2] uacce: Add uacce_ctrl misc device >=20 > On Fri, Jan 29, 2021 at 10:09:03AM +0000, Tian, Kevin wrote: > > > SVA is not doom to work with IO page fault only. If we have SVA+pin, > > > we would get both sharing address and stable I/O latency. > > > > Isn't it like a traditional MAP_DMA API (imply pinning) plus specifying > > cpu_va of the memory pool as the iova? >=20 > I think their issue is the HW can't do the cpu_va trick without also > involving the system IOMMU in a SVA mode >=20 > It really is something that belongs under some general /dev/sva as we > talked on the vfio thread AFAIK, there is no this /dev/sva so /dev/uacce is an uAPI which belongs to sva. Another option is that we add a system call like fs/userfaultfd.c, and move the file_operations and ioctl to the anon inode by creating fd via anon_inode_getfd(). Then nothing will be buried by uacce. >=20 > Jason Thanks Barry