Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4226886pxb; Mon, 1 Feb 2021 16:26:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKrEThQXcqsNdOP6iP9876gdZ3pyuBFb5x6wF+UWmtVW+FaauTdtK2RyqNWx5C79vARHP5 X-Received: by 2002:a17:906:c05a:: with SMTP id bm26mr21044756ejb.288.1612225594987; Mon, 01 Feb 2021 16:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612225594; cv=none; d=google.com; s=arc-20160816; b=QvrSn3xJUlamJVvZgMS3trk+gsfxvD/sZFa7FyMmciMzrDlVFDgEkgwuDwHDko3tx8 gY11QPPkF12/1XpkKoHHMSjKZ1mjRwDHp0HItpQiIEk8eXf58ySXaF96EhamN0zGgphx VC8eWnbBnJIWgK++R/7EowFyWNtSom1z5vtVG+gdCuJIZZDCZFse11kYmGKWJ2U/QxK7 BG/cehckqxELFF9qSsVOnh3qRjtDcmwqqOf55mst54nhNZpF34YpGKB1Bpuo3PNAafoJ t12ZnqRH9gIjOVLyHUIn4fTAnmec/4NsS8W5BBGjXKgBSG5+QjyblsPZ2PG/U4yF6LLi 7Akg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=VFfNyxrhV1U7Fy4tAkfN5UnZgf32Qmtxy0MYOJB9haE=; b=DxGDrdE+2DDzh2MgfEMwsYHAuzfJYaKTHpy0Fw8dENZKhHPW1W/MfwNlUVppyfILgq RuKad4+SYq5cIgSRGQAuGWAe+dAWIZdM3SHBrdXo0doVk4kyw9bR2nT3DoesJx8XkARV rzegaN8nhYHSw8qsqalsc0vHNUzrhVSZ/hWIJdZDimGbC0gqQsxjdoov5jMKhBlOnQG8 MfCQAgip4nzqAX5hmu7BmkxDDoVfCvDLWrsEH1yWB0sQu3qjhbDp4eUV5sEkqi1lSSwM rQRVgQq0dzBMgluTx7K9z/KgYbndYeYINDrEJ6voRwyKX19xYIpm69g5/WHC3uasadz+ 05Eg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si11828349ejk.500.2021.02.01.16.26.09; Mon, 01 Feb 2021 16:26:34 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230088AbhBBAWt convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Feb 2021 19:22:49 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:3413 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhBBAWr (ORCPT ); Mon, 1 Feb 2021 19:22:47 -0500 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: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----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 > > 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? > > I think their issue is the HW can't do the cpu_va trick without also > involving the system IOMMU in a SVA mode > > 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. > > Jason Thanks Barry