Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1665262rwn; Thu, 15 Sep 2022 21:24:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+fUrQID2D9YK27/euukvY2decTKWVPd57b+u57D/6123eyLSgeDTk1+4+qLav1QRNNWE8 X-Received: by 2002:a05:6402:24a4:b0:440:8c0c:8d2b with SMTP id q36-20020a05640224a400b004408c0c8d2bmr2295608eda.311.1663302247544; Thu, 15 Sep 2022 21:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663302247; cv=none; d=google.com; s=arc-20160816; b=pmqwkzpDKTVxWBGFtiuBdQ7xIYqFJ5mUDWrd/KVyo1ClPmg3N9/COXrgPLe+cRZ3yb a+EJTmUqw/Ito9qk++3o+I9qfxLoGk+3KU5YhsEmf7aIwOS9T9O10I+ZU68VVaGd28P5 i9nifC3YSbiUcSLVnwLTSVOImxaJvU2is/XucEWWrDabL62phnWuOZMprt+q0/omMFtX qpM2G7kN22q5+VXIZhQYZFxHtwsGXPzl7kyQTkCFPE5rB4ed/6Xhb8POi9r2RrRCr4TA j81PSDC6Md/jaHD6k41vMYagJYN0WtGakVKIPI5MzcogvD8t+wvYaiER03eLRQFOt49C VJog== 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:subject :from:content-language:references:to:cc:user-agent:mime-version:date :message-id:dkim-signature; bh=BtGXZCL5uE5OloaduKneWDsq7BCZFB/BfAm6lZed0bc=; b=zLdCi7wbJUJs98Bp82ZrsetufPELl9XVOKIcC0xVL0w8eeOApyPFuGKbcS/CVv54iQ T1P9KCvLQyKuTORBRIdw3VT78lZ39UCwfLVSBWT+T5pX/RCysMsic/yzLxS/RWRVeTop h9ch21Ii6ljda3EgAvn9nya8cbP0Muvg7tYGX8nnEdrrOZDDXANqTp3YUCzpsjAbZ/hb XAdpljxx9mA8Y/tMLbBPzK9gPegdSqvn7FQFrKxyCe8W5Puqj0G6+2LqWErpTvy7aKA4 99tsdmj3jpCyIvSQO/SEXxhxLr6tzXYGfLVVrYaaucWVjw5WBVvf86tNV45fmmAJ8WP8 5grA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UFWKlLtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090658c300b00779a07b4e90si19704052ejs.711.2022.09.15.21.23.34; Thu, 15 Sep 2022 21:24:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UFWKlLtP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbiIPDHc (ORCPT + 99 others); Thu, 15 Sep 2022 23:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbiIPDHB (ORCPT ); Thu, 15 Sep 2022 23:07:01 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A1949FAA6 for ; Thu, 15 Sep 2022 20:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663297552; x=1694833552; h=message-id:date:mime-version:cc:to:references:from: subject:in-reply-to:content-transfer-encoding; bh=AA4yM8sBHYK6jyGEDMWq+oJQ1iHOxkryKHMct2cC2aU=; b=UFWKlLtP0dGWYCDaNUwdOGfrH4NyWJ3Q/8PI7TQC6woLy3HoZjVIUhRX s75yZEneubM29suvRP5CAc23Y3gtMS/PrRlhVZ7AqBHLkhxtMDqQw2IU9 9OI/l8GtkYK7yA3L25Z5Vcqrnvcpa2xjrZ0J9fuh7Jw6yOV/j3ntipnjI 0QRPssQBKPRVlsZgNQz5ObntAeBOxEB6jjQWpYhEOANnkgzoRWvGVEhHo bTZLjcPZDPG1j6YC9AxEBTr2zfUryHNg80Pb8+uFcdilmfxmcNaJWwSPx SVINGnHxS24QeInC6fR+gLOO2elP5OCVuZsUq4vzDy3THfT6h+/hG3n0h g==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="281926880" X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="281926880" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 20:05:51 -0700 X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="613120043" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.214.216]) ([10.254.214.216]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 20:05:49 -0700 Message-ID: Date: Fri, 16 Sep 2022 11:05:47 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , linux-kernel@vger.kernel.org To: Ethan Zhao , iommu@lists.linux.dev References: <20220912024826.1684913-1-baolu.lu@linux.intel.com> <046916aa-980c-c40d-1163-6ab839248201@linux.intel.com> <5415d383-5442-a127-bdab-fce9e9b7a3b2@linux.intel.com> <78ec0fab-6f69-1d3d-86f3-84f159817707@linux.intel.com> Content-Language: en-US From: Baolu Lu Subject: Re: [PATCH 1/1] iommu/vt-d: Enable PASID during iommu device probe In-Reply-To: <78ec0fab-6f69-1d3d-86f3-84f159817707@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/9/16 10:40, Ethan Zhao wrote: >> >> I may not get you exactly. ???? Some IOMMU features reply on PASID >> capabilities on both IOMMU and device. The IOMMU drivers enumerate the >> capabilities and enable them if they are supported. > I might not express it straightforward,  I mean with this patch iommu > deals with > > the complexity of enabling PASID (globally?)  or not at probing stage , > instead > > of other device driver side decision to request IOMMU PASID enabling during > > their setup state.  if so you move the decision to iommu probe stage. > hmmm... I am sorry that the commit message was a bit confusing. Actually we always enable PASID at iommu probe path w/ or w/o this patch. > > Pros,  iommu driver controls everything about PASID enabling. > > Cons,  iommu driver handles all possible complexity about capability > matching Do device drivers need to configure PCI PASID without IOMMU? I searched the tree and found nothing. Best regards, baolu