Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1600305imm; Wed, 1 Aug 2018 20:09:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfXp53vc2Ei14FZYIpFnC2QVAHvS4exXC8Npafx9hdQ4EzK2CFaOqYHC/flEO+2N5wHq2pU X-Received: by 2002:a63:90c8:: with SMTP id a191-v6mr932862pge.173.1533179379356; Wed, 01 Aug 2018 20:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533179379; cv=none; d=google.com; s=arc-20160816; b=0tLLOZmEPGa6rmfoSHwC59gvPm4pfBqBXtyM57OlZ3LST8byWRrwtPxs7rHQWhcLXN iUukNPu8LN3mPFpvnxgcBFG8R3QSEG7IkBjeBVXd8p/1TMgzURvUL3rJx10UiJ4I8DYr MLQKu3Jk3oBWVaQsmqENZuPHx2zLDXq3j4FLPkhMJy7eBjtryKb3RryzRrF16ygYGgl6 DYr0hSIOmXJ9VlAQDDO80F13eYlRGn0gMEUNeOi6oDPKIVwhbUMIwljR0TqofUljRspU +V1oooZSjjrdkt5gHMulbWGQY5KjbuD0Z7+KqWwbJx0TwrlbkpazYjKeXj9cHQHBOD6v fbIA== 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 :arc-authentication-results; bh=UIpPfs1WVExnsb7a7z5TcKBJghJJsO4K8PuKhILOXes=; b=zgy/B6HZlk7DQc6YzzZ1srD7nxXBTeHSQIJx3kBsdY9ZSxm7fVPliH8EDXdTdrbPND cQXGdvBC0RCjYIeXze/exc4rUGiBtAe6Xair48i/kbsPFcw1zmbOrWtqvzaQc+kFrEiq HpAI/kF+NNZ5rAPUf7qwaSIbWZRH8QVi9EiH8vbOhg5gMqvrYVK2YeCWjmV0yCfdyJf+ tvs4x8HCp4+PqB53RlG2jWvnzsHxQ6qDYLOIveY1jMRJLh3NwAybkahoaaf4WtTgcjZY jYHns2siKA2nN/sJRiG+aW9+i4GLkYwK/5YjAIwUzGUojGem1MFJpHXAUDvPdGCvYsF5 RBAw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s29-v6si817849pfj.43.2018.08.01.20.09.25; Wed, 01 Aug 2018 20:09:39 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726522AbeHBE5c (ORCPT + 99 others); Thu, 2 Aug 2018 00:57:32 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52859 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725765AbeHBE5c (ORCPT ); Thu, 2 Aug 2018 00:57:32 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CB5FCB90D79D; Thu, 2 Aug 2018 11:08:29 +0800 (CST) Received: from localhost (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.399.0; Thu, 2 Aug 2018 11:08:21 +0800 Date: Thu, 2 Aug 2018 11:07:01 +0800 From: Kenneth Lee To: Randy Dunlap CC: Kenneth Lee , Jonathan Corbet , Herbert Xu , "David S . Miller" , Joerg Roedel , Alex Williamson , Hao Fang , Zhou Wang , Zaibo Xu , Philippe Ombredanne , Greg Kroah-Hartman , Thomas Gleixner , , , , , , , Lu Baolu , Sanjay Kumar , Subject: Re: [RFC PATCH 3/7] vfio: add spimdev support Message-ID: <20180802030701.GI160746@Turing-Arch-b> References: <20180801102221.5308-1-nek.in.cn@gmail.com> <20180801102221.5308-4-nek.in.cn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 09:23:52AM -0700, Randy Dunlap wrote: > Date: Wed, 1 Aug 2018 09:23:52 -0700 > From: Randy Dunlap > To: Kenneth Lee , Jonathan Corbet , > Herbert Xu , "David S . Miller" > , Joerg Roedel , Alex Williamson > , Kenneth Lee , Hao > Fang , Zhou Wang , Zaibo Xu > , Philippe Ombredanne , Greg > Kroah-Hartman , Thomas Gleixner > , linux-doc@vger.kernel.org, > linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, > iommu@lists.linux-foundation.org, kvm@vger.kernel.org, > linux-accelerators@lists.ozlabs.org, Lu Baolu , > Sanjay Kumar > CC: linuxarm@huawei.com > Subject: Re: [RFC PATCH 3/7] vfio: add spimdev support > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > Message-ID: > > On 08/01/2018 03:22 AM, Kenneth Lee wrote: > > From: Kenneth Lee > > > > SPIMDEV is "Share Parent IOMMU Mdev". It is a vfio-mdev. But differ from > > the general vfio-mdev: > > > > 1. It shares its parent's IOMMU. > > 2. There is no hardware resource attached to the mdev is created. The > > hardware resource (A `queue') is allocated only when the mdev is > > opened. > > > > Currently only the vfio type-1 driver is updated to make it to be aware > > of. > > > > Signed-off-by: Kenneth Lee > > Signed-off-by: Zaibo Xu > > Signed-off-by: Zhou Wang > > --- > > drivers/vfio/Kconfig | 1 + > > drivers/vfio/Makefile | 1 + > > drivers/vfio/spimdev/Kconfig | 10 + > > drivers/vfio/spimdev/Makefile | 3 + > > drivers/vfio/spimdev/vfio_spimdev.c | 421 ++++++++++++++++++++++++++++ > > drivers/vfio/vfio_iommu_type1.c | 136 ++++++++- > > include/linux/vfio_spimdev.h | 95 +++++++ > > include/uapi/linux/vfio_spimdev.h | 28 ++ > > 8 files changed, 689 insertions(+), 6 deletions(-) > > create mode 100644 drivers/vfio/spimdev/Kconfig > > create mode 100644 drivers/vfio/spimdev/Makefile > > create mode 100644 drivers/vfio/spimdev/vfio_spimdev.c > > create mode 100644 include/linux/vfio_spimdev.h > > create mode 100644 include/uapi/linux/vfio_spimdev.h > > > > diff --git a/drivers/vfio/spimdev/Kconfig b/drivers/vfio/spimdev/Kconfig > > new file mode 100644 > > index 000000000000..1226301f9d0e > > --- /dev/null > > +++ b/drivers/vfio/spimdev/Kconfig > > @@ -0,0 +1,10 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +config VFIO_SPIMDEV > > + tristate "Support for Share Parent IOMMU MDEV" > > + depends on VFIO_MDEV_DEVICE > > + help > > + Support for VFIO Share Parent IOMMU MDEV, which enable the kernel to > > enables > > > + support for the light weight hardware accelerator framework, WrapDrive. > > support the lightweight hardware accelerator framework, WrapDrive. > > > + > > + To compile this as a module, choose M here: the module will be called > > + spimdev. > > > -- > ~Randy Thanks, I will update it in next version. -- -Kenneth(Hisilicon) ================================================================================ 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!