Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2220367ybb; Fri, 27 Mar 2020 01:09:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vul2MQai9ILHdVloWmnXWBDTsQmVPatwMA0NNWpuHo6tlqT05cVr20gh2LUVhIDse25MtCA X-Received: by 2002:aca:3008:: with SMTP id w8mr3017623oiw.96.1585296562353; Fri, 27 Mar 2020 01:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585296562; cv=none; d=google.com; s=arc-20160816; b=QTfe/e0q/6k8HIewBq18r/N3XzzGZgzw1UJzBg8UHXdOmz5Vti616Kfh39ilC9fJSX h8qTAljnJymvyuqZwk8+pVqUmO++24PQ/pYPlxOxj1mlHQY1K0kPCSMZ9efAxGCCv55g 1fGDML64MTiurTRoNQ4nJ83+L++wq4ELtNHg5QWq/RQ0n9sF3u9whlzuP9P8tvRGlphO NSX1NyU6P2S2ICM6uqCEUgwXnA+sMWZrLIAv1qV6UviM256jleQCR1r3Od+3vtMKonha L3j0cK9wIE2Of9ANlgWdQzLDseXN8KdspdPHZjDN6B59mc313xdc9uA+GZEYT6N+CbVW t7LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=ZbA/ZnLbiLmJjfJ8gCfN1M0FuLEvKNClFM/Ouif1neI=; b=0/GZ2fll9bZ91QRgh/t9XWkAZ1QWJkLv+mrHfFjIrJZEgiKFre1utUVIOkoyvAgo0R k6VUFJoAsHxIJzn1u7evY0TEf+Hm4K+OKO5dNSsMWYeePlaJr9+aV5sGZuHbuF8DQIh7 pI1R2lwtLiP+kxl2xNc2y53tLwpUuYE/S35cTIuCWtAqp6zKD+KtYYxRitQ7u+etNhs6 8c/wjAv7hbHIJVJy31/Ck5uheBct3AKOUGMm86DWnjvi7jQXjchVYIg1jY9SNzJgUxxg /S1N6PkHCi72OKiXqVdCVzYDDwMgnvY+0PaxotgCR/tSRSuNWWGru8fGxTe2dR8xIsvH pcwQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62si2072690oiz.23.2020.03.27.01.09.09; Fri, 27 Mar 2020 01:09:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726266AbgC0IIf convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Mar 2020 04:08:35 -0400 Received: from mga12.intel.com ([192.55.52.136]:5051 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgC0IIe (ORCPT ); Fri, 27 Mar 2020 04:08:34 -0400 IronPort-SDR: vp7rjvUc+0sR3I0iapznDKJbbY9DDV0BECAnVbaOC1uYW64hvQYXrLKy0vY8E0+kZW/SMOAagJ MBavNtL0zQNg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 01:08:34 -0700 IronPort-SDR: buR524aD/e80Ourn79f7DoPrbFKB539C8LldXmTnXIJdDmxCvG/3wdxp9TV0UVUvNHHh7ie3mC J+9ePs1vUlcQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,311,1580803200"; d="scan'208";a="241224785" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 27 Mar 2020 01:08:34 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 01:08:33 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 01:08:33 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.137]) with mapi id 14.03.0439.000; Fri, 27 Mar 2020 16:08:31 +0800 From: "Tian, Kevin" To: Jacob Pan , Joerg Roedel , Alex Williamson , Lu Baolu , "iommu@lists.linux-foundation.org" , LKML , David Woodhouse , Jean-Philippe Brucker CC: "Liu, Yi L" , "Raj, Ashok" , Christoph Hellwig , Jonathan Cameron , Eric Auger Subject: RE: [PATCH 02/10] iommu/vt-d: Set IOASID capacity when SVM is enabled Thread-Topic: [PATCH 02/10] iommu/vt-d: Set IOASID capacity when SVM is enabled Thread-Index: AQHWAs3Jv/fTpFRE2EynDv9cbyI49ahcGAig Date: Fri, 27 Mar 2020 08:08:30 +0000 Message-ID: References: <1585158931-1825-1-git-send-email-jacob.jun.pan@linux.intel.com> <1585158931-1825-3-git-send-email-jacob.jun.pan@linux.intel.com> In-Reply-To: <1585158931-1825-3-git-send-email-jacob.jun.pan@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Jacob Pan > Sent: Thursday, March 26, 2020 1:55 AM > > Assign system-wide PASID capacity with enumerated max value. > Currently, all Intel SVM capable devices should support full 20 bits of > PASID value. > > Signed-off-by: Jacob Pan > --- > drivers/iommu/intel-iommu.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c > index a699a765c983..ec3fc121744a 100644 > --- a/drivers/iommu/intel-iommu.c > +++ b/drivers/iommu/intel-iommu.c > @@ -3510,6 +3510,10 @@ static int __init init_dmars(void) > if (ret) > goto free_iommu; > > + /* PASID is needed for scalable mode irrespective to SVM */ > + if (intel_iommu_sm) > + ioasid_install_capacity(intel_pasid_max_id); > + > /* > * for each drhd > * enable fault log > -- > 2.7.4 Reviewed-by: Kevin Tian