Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2242139ybb; Fri, 27 Mar 2020 01:40:48 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsnCED4o/LpwSU1KQg9sdeHKL4ywqc1i3iNXY3LgO0A7/Yyl2afsovKyMLazBJ4r6HMvG/a X-Received: by 2002:a05:6830:10a:: with SMTP id i10mr8189409otp.190.1585298448770; Fri, 27 Mar 2020 01:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585298448; cv=none; d=google.com; s=arc-20160816; b=kBg7RCJrWL65una8Oq39A7W146exlRn4a1IYbxv+jGwQZcfMdj6cYkt94wU/pMy3xz szVKuuQg0J/85KghwBkjxNJKbcjPEroBo+J13LM+vZSbWdED+GLTEc8UN/amfxd8YcQ0 Y//4OvO+V+LxvKhCgAmBkUZp0mYeFj+oFcquWHCe+mELjDvva8u59Rfbi7dLnW1abirD bZvpWoZAkIpdVpknnZw/eZ+k2cR+BTWIBCshRgKDW7unkWVrarWo3MmX7otguj029o+v 67iLyIxYfyRvckEalRDYH0IB7YBYrA/rc5MrQ5AcAgo3t+mWW5JnW2dWrSAMPYSPtV6G pz2g== 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=wZ28R/bVVlNncv52aKpfK7hLQhF5fzZr52rQB8lQ8m0=; b=eqglroBqFKY/NA11g0riskhqELyk7OgDNCxO0oVN70Vl33D2dlFyXcXdDH2Dc8wXr6 gKefTPyLRs00EWvMcCpElzOWXtvut4Gdewx3yt3kF0e7zB5C5fhgz4RWftbSTiM4U/ny RiNrktOCgLIreIarBqNQEcZynLXEVxPGVC0x4eEzhmuyDoGTBnjY/yPZbXcs2ssygYS8 vvusGbn5SJtn1OzdDL5OwIFkrafc/77KyruS+HAY8bH1L1l1aNqpgCLnhPNAfD1W0QNA 85I3rmgyoWzX/gCVzbzxx6rN6GmLFX4inemWT24hkz9Uz9jrf3louNKJNpmzEi7mJ2Wl 1wYg== 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 g2si2163043otr.13.2020.03.27.01.40.33; Fri, 27 Mar 2020 01:40:48 -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 S1726400AbgC0Iiu (ORCPT + 99 others); Fri, 27 Mar 2020 04:38:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:22907 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgC0Iiu (ORCPT ); Fri, 27 Mar 2020 04:38:50 -0400 IronPort-SDR: HoAd2dL2N8wh4s4+VxitaB4BKbV4B+AfT+EZqnjk7gNGnTQJo717qekE/8P5zSwAJ/D4Eakxkk 8OQefFCR+/RQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 01:38:48 -0700 IronPort-SDR: F0YDBRd4RYPMu9XCKxV5fjxb/1qRZkaH3XMh0Rj7nEpJfFIUxJvzGTnrVdaz0CQ9+aB+7t69a1 JGVnlajJDzNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,311,1580803200"; d="scan'208";a="239043680" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 27 Mar 2020 01:38:48 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 01:38:47 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Mar 2020 01:38:47 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 27 Mar 2020 01:38:47 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by shsmsx102.ccr.corp.intel.com ([169.254.2.50]) with mapi id 14.03.0439.000; Fri, 27 Mar 2020 16:38:45 +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 03/10] iommu/ioasid: Introduce per set allocation APIs Thread-Topic: [PATCH 03/10] iommu/ioasid: Introduce per set allocation APIs Thread-Index: AQHWAs3Jr8mtWtaBwEy82ZdXSdJa+6hcGLfg Date: Fri, 27 Mar 2020 08:38:44 +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> In-Reply-To: <1585158931-1825-4-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="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 OiBUaHVyc2RheSwgTWFyY2ggMjYsIDIwMjAgMTo1NSBBTQ0KPiANCj4gSU9BU0lEIHNldCBkZWZp bmVzIGEgZ3JvdXAgb2YgSURzIHRoYXQgc2hhcmUgdGhlIHNhbWUgdG9rZW4uIFRoZQ0KPiBpb2Fz aWRfc2V0IGNvbmNlcHQgaGVscHMgdG8gZG8gcGVybWlzc2lvbiBjaGVja2luZyBhbW9uZyB1c2Vy cyBhcyBpbiB0aGUNCj4gY3VycmVudCBjb2RlLg0KPiANCj4gV2l0aCBndWVzdCBTVkEgdXNhZ2Us IGVhY2ggVk0gaGFzIGl0cyBvd24gSU9BU0lEIHNldC4gTW9yZQ0KPiBmdW5jdGlvbmFsaXRpZXMg YXJlIG5lZWRlZDoNCj4gMS4gRW5mb3JjZSBxdW90YSwgZWFjaCBndWVzdCBtYXkgYmUgYXNzaWdu ZWQgbGltaXRlZCBxdW90YSBzdWNoIHRoYXQgb25lDQo+IGd1ZXN0IGNhbm5vdCBhYnVzZSBhbGwg dGhlIHN5c3RlbSByZXNvdXJjZS4NCj4gMi4gU3RvcmVzIElPQVNJRCBtYXBwaW5nIGJldHdlZW4g Z3Vlc3QgYW5kIGhvc3QgSU9BU0lEcw0KPiAzLiBQZXIgc2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