Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2425641rdh; Wed, 27 Sep 2023 02:07:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMW15N8bXHsIpxaxXfuTmnpLfiWE4K6oI8lMiof6HWvcS5bGFu/VlT3urA6pyqe3nzZb6C X-Received: by 2002:a17:902:d50e:b0:1c5:59dc:6e93 with SMTP id b14-20020a170902d50e00b001c559dc6e93mr2577772plg.3.1695805665452; Wed, 27 Sep 2023 02:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695805665; cv=none; d=google.com; s=arc-20160816; b=DUB8d3DUiWAVvsDS2wnWVadV0zlO+EYBdC8iUOdBQJitHWhcRCkSMkmWVbHIaxUQUy QuNxWRbVOBHDinOks8J/PQgJJwXUa9WJu7pIzAv5ca9tVdZg3bTZje3T3N2eOXcf9fP5 vtGM4kXVNzAqnQYP2hp8I01f5YyBlr2zPf+5J3QSKFfdJ/u0p/xkCTxapem6mPnxog/D x9oP+scMWCp2/i1wXGN9ibH2tZmcqTKPqB2kEIxoEyB7/b9m71tqWXwI/88BsBh6JRWI dHpFPCkn6ze8kqgzDbGqpEsMdMgbMXIFiFdkSvNPkFu2+7vPbfmJ8ABkLUMLs9ZKpGmr 4/RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=tHkqBjH3P/Q12/o2QTawlLCOUMeYuwe1X4zwYxA9mis=; fh=wiPCut/Lwb9HOaIBsKqejgkoMu/rEKNOPUfoJ99CU7A=; b=PJMqwBTsYGdBobhBGHDrP/1oZ30Ty9mjqKMlndgkneiBvC6Eb9n5j9NIY6+CYCydXO iyfkHdmhDEoE7y3TcuZd1/qUOHETObmRmvlcq+s4nq0ofxqUrw12T9SZ1+K9sxe0W2JL yssNWQ5aS9owm4GQKzBDyozYSbYx4Vm7HaLL9impWE3yBlRjb6tzIzduw4VX3mrusBSW 3yYRiz4Zzcryrf/BYsSNeDNX/eTAFWXUTOvQodX1lddmMRB6u9FTlTbkEt0lt/AImUsB sACaEmZ7Ps5+wQhvU7Jrx5igWC4HoEM01jyXBiSertDfSiEUS5qkTlj0/N/d2VhktrrD EB/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QnARFQ8i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id jy6-20020a17090342c600b001c589ba4a08si13792616plb.1.2023.09.27.02.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 02:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QnARFQ8i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0ACA481DF27B; Wed, 27 Sep 2023 00:58:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbjI0H5y (ORCPT + 99 others); Wed, 27 Sep 2023 03:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjI0H5v (ORCPT ); Wed, 27 Sep 2023 03:57:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7034211D; Wed, 27 Sep 2023 00:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695801470; x=1727337470; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=9fw5JqfZGLtP0EZFkSoh3FLyEdYPUKKgalF0hPfoVOU=; b=QnARFQ8iJS+jx0V+QVnFyuQKrZF9HtxbNR8V5HkMQC0frGojRJCfVt2e WZyPPFDoz2PSGCzUb/HuNYDo/lXL3eZ0HED++tDN4AHMM73nODOuwH8Kn EVrc08BtMLJicCS0ftGY0iJKdR8WqJdhcEhT7yxPsAqRqrC2ZYdVNgBIT V+RIL50685SNcNbyZKpSsxuveqpP79ahWFfFNJuO0yMJwC8BbSgNpePwc CjkwE0eMs226hK3Ow4cbSxvrM6PqMYUfvC5Vk0itm+AcHc7RCm9xYh4Cs srH4CNL/Kx5a59hqupBhK6T+UHh07OHS0ipRl2gN58AYHwOMBjnZCyGik Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="384542935" X-IronPort-AV: E=Sophos;i="6.03,179,1694761200"; d="scan'208";a="384542935" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2023 00:57:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="698770726" X-IronPort-AV: E=Sophos;i="6.03,179,1694761200"; d="scan'208";a="698770726" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.214.206]) ([10.254.214.206]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2023 00:57:43 -0700 Message-ID: <04af40a3-1675-4b1c-27de-39d261dcb1cf@linux.intel.com> Date: Wed, 27 Sep 2023 15:57:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: baolu.lu@linux.intel.com, "cohuck@redhat.com" , "eric.auger@redhat.com" , "nicolinc@nvidia.com" , "kvm@vger.kernel.org" , "mjrosato@linux.ibm.com" , "chao.p.peng@linux.intel.com" , "yi.y.sun@linux.intel.com" , "peterx@redhat.com" , "jasowang@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "lulu@redhat.com" , "suravee.suthikulpanit@amd.com" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" , "Duan, Zhenzhong" , "Martins, Joao" Subject: Re: [RFC 8/8] iommu/vt-d: Add set_dev_pasid callback for nested domain To: "Tian, Kevin" , "Liu, Yi L" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "jgg@nvidia.com" , "robin.murphy@arm.com" References: <20230926092651.17041-1-yi.l.liu@intel.com> <20230926092651.17041-9-yi.l.liu@intel.com> Content-Language: en-US From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 27 Sep 2023 00:58:01 -0700 (PDT) On 2023/9/27 15:52, Tian, Kevin wrote: >> From: Liu, Yi L >> Sent: Tuesday, September 26, 2023 5:27 PM >> >> From: Lu Baolu >> >> This allows the upper layers to set a nested type domain to a PASID of a >> device if the PASID feature is supported by the IOMMU hardware. >> >> Signed-off-by: Lu Baolu >> Signed-off-by: Yi Liu >> --- >> drivers/iommu/intel/nested.c | 47 >> ++++++++++++++++++++++++++++++++++++ >> 1 file changed, 47 insertions(+) > pasid can be attached to either user hwpt or kernel hwpt. > > We should also introduce a set_dev_pasid callback for non-nest domain ops. We already have the code in Linus' tree. The idxd driver uses it for kernel DMA with pasid. Best regards, baolu