Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp446584pxy; Thu, 22 Apr 2021 06:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwX9HytsamyBsfUefVr8YBHvv3j/5+gmT6K6lg1sWt2n8KBMtIojk7iPm5oT8vRC6s5ALv X-Received: by 2002:a05:6402:510f:: with SMTP id m15mr3796805edd.328.1619096415903; Thu, 22 Apr 2021 06:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619096415; cv=none; d=google.com; s=arc-20160816; b=VXqkBJNT1RWWqmjvXvLNJcdGj9zBReYrJukS931brSP7Q9SSzcU6SjTGgOSn4UTJ49 MzVbYTw+vw3ZygnMWNUZu2lNxoiaxWWQ8D5WbzbTcJBqS5FBCqR1ygIVqhmwspHlkg52 b+pn6gdKjaR/G6owuwgBDCjxtLlpnDZBSqJF1t5D3cJjjanOs66Zu+aGTDiWMkZkuaMK MuuUuYIQGQxUx6NBff7xPwn5858AJ7cjUdbTLcs3oKU57j5DdRWjuX4hGir9yqZrED6R awIMFlm6l6nYgxrVx6WZp1TR8/bHj8fOgtPeGhpAXFgM0Sy0YRfFs/xV8xP4XTa/IqTJ fGMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:ironport-sdr:ironport-sdr; bh=gNX+jxjKuHEpmzL2inRR9ghcxhFIc7BPrCNHG8Q8h3Y=; b=C13bh4j6GotSn7CAUPb5rsgLvVMLVywMNs6Zo1botW0ZCODfbZmaA4Cbd+oB5SqghE Oq8OBMZhqvhYGkEaK8SBEy7E0o5iZq2SesVQBedOa0n8z0WU7o1F6d5CoYfe3vaoPkfz I8OqlPCLo9JzEL6Z92ScgM3GBcoqLTQ5FhFe7FHuUpDQCD4VjFHpEzMBKEgnD3O3E8fQ S/YII9BLhq/QyRZZJY2I4hz+MrmDAt5Kofyk4/5XiXWgSatGxmV3dspS+BBEDfe4Ys+f NMrlGECLPSAlCA51Uk8encmbczVBmqOfnfPRHutAmNZ3Bw7rKw7kc4WtPRt14dPq4kcm F14A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si2185085edc.25.2021.04.22.05.59.52; Thu, 22 Apr 2021 06:00:15 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236326AbhDVM47 (ORCPT + 99 others); Thu, 22 Apr 2021 08:56:59 -0400 Received: from mga11.intel.com ([192.55.52.93]:50634 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236250AbhDVM44 (ORCPT ); Thu, 22 Apr 2021 08:56:56 -0400 IronPort-SDR: MumVY8dUwPgqFynXsxHqJV2GsvhLeiWdsT5HsLkuFHwWOf29j28O++mg654Wa3EcWJ0oNNmwak f3LRXZQVmp+Q== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="192692233" X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="192692233" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 05:56:21 -0700 IronPort-SDR: y1fbkouyq0pnuB+LErciUqaGFcqjHgtZrsWF26wfwvrJ3dQFNFuVxqLxJfuF3qhXa4XEqx3Vrr nxcKimXuEhSg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="446262806" Received: from yiliu-dev.bj.intel.com (HELO yiliu-dev) ([10.238.156.135]) by fmsmga004.fm.intel.com with ESMTP; 22 Apr 2021 05:56:17 -0700 Date: Thu, 22 Apr 2021 20:55:05 +0800 From: Liu Yi L To: Alex Williamson Cc: yi.l.liu@intel.com, Jason Gunthorpe , Jean-Philippe Brucker , "Tian, Kevin" , "Jiang, Dave" , "Raj, Ashok" , Jonathan Corbet , Jean-Philippe Brucker , Li Zefan , LKML , "iommu@lists.linux-foundation.org" , Johannes Weiner , Tejun Heo , "cgroups@vger.kernel.org" , "Wu, Hao" , David Woodhouse Subject: Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs Message-ID: <20210422205505.75f086f8@yiliu-dev> In-Reply-To: <20210421133312.15307c44@redhat.com> References: <20210401134236.GF1463678@nvidia.com> <20210401160337.GJ1463678@nvidia.com> <4bea6eb9-08ad-4b6b-1e0f-c97ece58a078@redhat.com> <20210415230732.GG1370958@nvidia.com> <20210416061258.325e762e@jacob-builder> <20210416094547.1774e1a3@redhat.com> <20210421162307.GM1370958@nvidia.com> <20210421105451.56d3670a@redhat.com> <20210421175203.GN1370958@nvidia.com> <20210421133312.15307c44@redhat.com> Organization: IAGS/SSE(OTC) X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Apr 2021 13:33:12 -0600, Alex Williamson wrote: > On Wed, 21 Apr 2021 14:52:03 -0300 > Jason Gunthorpe wrote: > > > On Wed, Apr 21, 2021 at 10:54:51AM -0600, Alex Williamson wrote: > > > > > That's essentially replacing vfio-core, where I think we're more > > > > I am only talking about /dev/vfio here which is basically the IOMMU > > interface part. > > > > I still expect that VFIO_GROUP_SET_CONTAINER will be used to connect > > /dev/{ioasid,vfio} to the VFIO group and all the group and device > > logic stays inside VFIO. > > But that group and device logic is also tied to the container, where > the IOMMU backend is the interchangeable thing that provides the IOMMU > manipulation for that container. If you're using > VFIO_GROUP_SET_CONTAINER to associate a group to a /dev/ioasid, then > you're really either taking that group outside of vfio or you're > re-implementing group management in /dev/ioasid. I'd expect the > transition point at VFIO_SET_IOMMU. per my understanding, transiting at the VFIO_SET_IOMMU point makes more sense as VFIO can still have the group and device logic, which is the key concept of group granularity isolation for userspace direct access. -- Regards, Yi Liu