Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp327691ybb; Fri, 27 Mar 2020 23:34:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvYGllHExNYjghSjmlRSAlIV33+AuSJD8zDrICPQhwmWCbCgn3SAii/iECOlqRmCSY3PbgV X-Received: by 2002:a9d:23a1:: with SMTP id t30mr1682338otb.253.1585377290001; Fri, 27 Mar 2020 23:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585377289; cv=none; d=google.com; s=arc-20160816; b=Dcddsa1DPhr3Us/UmcZk2lZexFrskV5A1wQ1RPbLPdQolEBJ7kcpVlIjP6SFz9oOxh gxJbhmkulGIPu6gz9J+6kV/bvNm7cmUglQObnQowtIvRmfZNULJK32rCB/N1TY1dGuFB VRYX8RrPPgDJL557aaJh7cI+p0A/kYkEzPFW6anqhHWtcgDn532yrgIelk32ewiTMN3M EawXZHNQsejtTqnUbD4f8JphtH91sYxxrCVaBKdBL5k8MU+qW57DXNrQOm3yQtFQYkV0 f8TYwd9x2YDog6g7nWgKP9a1u5xixumfIEOyb5FdN+hh7mHs1ulat4Uu7lECFrYsTPiJ 30Ug== 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=Y8RCRTnX8NmqUUPbE3oXeDrCZR0y3dRy7M8q4DEyjDc=; b=onWQPJCcGWxuDOzTe4P8xdwex/aG7ntQ9NPcRDU12ScMUGDLqgLgmRd8d6PQQtKoYG 6wC5VYADaiC5A28wUS6C2YKVBggGK0cm2DAh5gkStggCZ854Wx905jxUEwIgLxbvb9T+ L9rW0/KxDN4dvgvjh6rW5FDmhf7+Rqb39JFKOM4xQ0TsmdMZ2cVVLe8XFp4TgOgmq+ci 0mhtnokfNRpD6RQkkvSkBuuYZn9P9yRWB+TlvvcZQwPmGOxMpUq9y/+4cTEzVOas0Wsz Xs3e3zG0AU7mhzIngg4YgzBAcE2dJJ5dAz7iySeaS0J01Fjw7u4WY00/W34x/EFmuC8o B7Dg== 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 m10si3305455ote.6.2020.03.27.23.34.23; Fri, 27 Mar 2020 23:34:49 -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 S1725965AbgC1Gci (ORCPT + 99 others); Sat, 28 Mar 2020 02:32:38 -0400 Received: from mga07.intel.com ([134.134.136.100]:51134 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbgC1Gci (ORCPT ); Sat, 28 Mar 2020 02:32:38 -0400 IronPort-SDR: TtWfpYmDsP+e93A/fy8I5+Fm7FBTj+HvipvaMJguHrCc2KsOFl5c5qQBRPJOOSnqBWNed0K7xW I0xWbJL06g1g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 23:32:33 -0700 IronPort-SDR: 2y9A7XlRFese5nibX09mOeIesC5h/GG8P6yAzHgN0AZ3bbKiYL0CgvavOJ0FmkKn8WDJnnlYI1 iKd0J/4Js/pw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,315,1580803200"; d="scan'208";a="266428882" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 27 Mar 2020 23:32:33 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 23:32:33 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 23:32:32 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.138]) with mapi id 14.03.0439.000; Sat, 28 Mar 2020 14:32:30 +0800 From: "Tian, Kevin" To: Jacob Pan CC: Joerg Roedel , Alex Williamson , Lu Baolu , "iommu@lists.linux-foundation.org" , LKML , David Woodhouse , Jean-Philippe Brucker , "Liu, Yi L" , "Raj, Ashok" , Christoph Hellwig , Jonathan Cameron , Eric Auger Subject: RE: [PATCH 03/10] iommu/ioasid: Introduce per set allocation APIs Thread-Topic: [PATCH 03/10] iommu/ioasid: Introduce per set allocation APIs Thread-Index: AQHWAs3Jr8mtWtaBwEy82ZdXSdJa+6hcGLfggAANsoCAAWdk0A== Date: Sat, 28 Mar 2020 06:32:29 +0000 Message-ID: References: <1585158931-1825-1-git-send-email-jacob.jun.pan@linux.intel.com> <1585158931-1825-4-git-send-email-jacob.jun.pan@linux.intel.com> <20200327095923.4454cc7f@jacob-builder> In-Reply-To: <20200327095923.4454cc7f@jacob-builder> 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="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBKYWNvYiBQYW4gPGphY29iLmp1bi5wYW5AbGludXguaW50ZWwuY29tPg0KPiBTZW50 OiBTYXR1cmRheSwgTWFyY2ggMjgsIDIwMjAgMTI6NTkgQU0NCj4gDQo+IE9uIEZyaSwgMjcgTWFy IDIwMjAgMDg6Mzg6NDQgKzAwMDANCj4gIlRpYW4sIEtldmluIiA8a2V2aW4udGlhbkBpbnRlbC5j b20+IHdyb3RlOg0KPiANCj4gPiA+IEZyb206IEphY29iIFBhbiA8amFjb2IuanVuLnBhbkBsaW51 eC5pbnRlbC5jb20+DQo+ID4gPiBTZW50OiBUaHVyc2RheSwgTWFyY2ggMjYsIDIwMjAgMTo1NSBB TQ0KPiA+ID4NCj4gPiA+IElPQVNJRCBzZXQgZGVmaW5lcyBhIGdyb3VwIG9mIElEcyB0aGF0IHNo YXJlIHRoZSBzYW1lIHRva2VuLiBUaGUNCj4gPiA+IGlvYXNpZF9zZXQgY29uY2VwdCBoZWxwcyB0 byBkbyBwZXJtaXNzaW9uIGNoZWNraW5nIGFtb25nIHVzZXJzIGFzDQo+ID4gPiBpbiB0aGUgY3Vy cmVudCBjb2RlLg0KPiA+ID4NCj4gPiA+IFdpdGggZ3Vlc3QgU1ZBIHVzYWdlLCBlYWNoIFZNIGhh cyBpdHMgb3duIElPQVNJRCBzZXQuIE1vcmUNCj4gPiA+IGZ1bmN0aW9uYWxpdGllcyBhcmUgbmVl ZGVkOg0KPiA+ID4gMS4gRW5mb3JjZSBxdW90YSwgZWFjaCBndWVzdCBtYXkgYmUgYXNzaWduZWQg bGltaXRlZCBxdW90YSBzdWNoDQo+ID4gPiB0aGF0IG9uZSBndWVzdCBjYW5ub3QgYWJ1c2UgYWxs IHRoZSBzeX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