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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0B78C61DA4 for ; Thu, 9 Mar 2023 16:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=48LMZUOLaIiiysXUO5ZScF7QhNxBlP5oAmZyWEoe92A=; b=bgDgxbjjeCnzGW +TPXZTvdXt+2yjgPjsBLz1hdAI2vi5BkOF3Znvpj5hLE9osj7NQSBwnrHk55KZU3BZWVIf8JkNkbx TaYfIer3zYu+/5KMpDEDtT+JCZHAvy4tvFd6v49gr39bBXd9n04HwsDP6bdC3xlAcYC5J7XtWBXDa ydpUUxHt4F6/GnVDolH8MY4kLuFTN1g7yAhmrf1EWKJ7y3x+zP+gUQhYsWOkdnjAv7bpLccsjzIyU +ovc1/zej3M5fRKGvD42DiuEbzWjMdGLpyVZUq/COvEbQ6JvIpj540O/4FamkHg41Dyulzv3++j4W 0zzShtzWlsRY2G8zWoTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paIoO-00BC1W-9F; Thu, 09 Mar 2023 16:08:12 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paIoB-00BBwb-V7 for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 16:08:02 +0000 Received: from lhrpeml500002.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PXYwl1bqWz6J6rf; Fri, 10 Mar 2023 00:07:19 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by lhrpeml500002.china.huawei.com (7.191.160.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 9 Mar 2023 16:07:54 +0000 Received: from lhrpeml500005.china.huawei.com ([7.191.163.240]) by lhrpeml500005.china.huawei.com ([7.191.163.240]) with mapi id 15.01.2507.021; Thu, 9 Mar 2023 16:07:54 +0000 From: Shameerali Kolothum Thodi To: Jason Gunthorpe CC: Jean-Philippe Brucker , Nicolin Chen , "robin.murphy@arm.com" , "will@kernel.org" , "eric.auger@redhat.com" , "kevin.tian@intel.com" , "baolu.lu@linux.intel.com" , "joro@8bytes.org" , "linux-arm-kernel@lists.infradead.org" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "yi.l.liu@intel.com" Subject: RE: [PATCH v1 02/14] iommufd: Add nesting related data structures for ARM SMMUv3 Thread-Topic: [PATCH v1 02/14] iommufd: Add nesting related data structures for ARM SMMUv3 Thread-Index: AQHZUnWTVXhuXoh0OkWPSyQY1srSfq7ydQKAgAAVzLCAAAsqAIAAANyQgAAEp4CAAACeQA== Date: Thu, 9 Mar 2023 16:07:54 +0000 Message-ID: <4c1f57adbe0c4d48849d585508595939@huawei.com> References: <364cfbe5b228ab178093db2de13fa3accf7a6120.1678348754.git.nicolinc@nvidia.com> <20230309134217.GA1673607@myrica> <213a05ef06944a55a148995053b187f8@huawei.com> <39979642ba8042ba9d4de651fecfeffb@huawei.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.227.178] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_080800_324941_85E6B1E3 X-CRM114-Status: GOOD ( 20.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > -----Original Message----- > From: Jason Gunthorpe [mailto:jgg@nvidia.com] > Sent: 09 March 2023 16:00 > To: Shameerali Kolothum Thodi > Cc: Jean-Philippe Brucker ; Nicolin Chen > ; robin.murphy@arm.com; will@kernel.org; > eric.auger@redhat.com; kevin.tian@intel.com; baolu.lu@linux.intel.com; > joro@8bytes.org; linux-arm-kernel@lists.infradead.org; > iommu@lists.linux.dev; linux-kernel@vger.kernel.org; yi.l.liu@intel.com > Subject: Re: [PATCH v1 02/14] iommufd: Add nesting related data structures > for ARM SMMUv3 > > On Thu, Mar 09, 2023 at 03:51:42PM +0000, Shameerali Kolothum Thodi > wrote: > > > > For ARM cases where there is no shared VMID space with KVM, the ARM > > > VMID should be somehow assigned to the iommfd_ctx itself and the alloc > > > domain op should receive it from there. > > > > Is there any use of VMID outside SMMUv3? I was thinking if nested domain > alloc > > doesn't provide the KVM instance, then SMMUv3 can use its internal VMID. > > When we talk about exposing an SMMUv3 IOMMU CMDQ directly to > userspace then > VMID is the security token that protects it. > > So in that environment every domain under the same iommufd should > share the same VMID so that the CMDQ's also share the same VMID. > > I expect this to be a common sort of requirement as we will see > userspace command queues in the other HW as well. > > So, I suppose the answer for now is that ARM SMMUv3 should just > allocate one VMID per iommu_domain and there should be no VMID in the > uapi at all. > > Moving all iommu_domains to share the same VMID is a future patch. > > Though.. I have no idea how vVMID is handled in the SMMUv3 > architecture. I suppose the guest IOMMU HW caps are set in a way that > it knows it does not have VMID? I think, Guest only sets up the SMMUv3 S1 stage and it doesn't use VMID. Thanks, Shameer _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel