Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp266016ybb; Tue, 31 Mar 2020 22:59:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuf6PukeJlYHpOIrQL/IiW5vqIUqVoSpnW4riBVeb+tumXBl1ewhfQBXPAVc7cc4kX8OeYx X-Received: by 2002:a9d:344:: with SMTP id 62mr6296163otv.102.1585720762179; Tue, 31 Mar 2020 22:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585720762; cv=none; d=google.com; s=arc-20160816; b=orUigQ5Xj2qu81eRWfgfvuNYQOa4f5XNrZzYdDhfOvZ1DWFekuIcKE/nVLFC8IvAzC WwOvK0viDIxt02pxlF4q6CUeITuYjv/dfaW1oPH7oe6ZXBtQ2cmJhONOjkRIG6f9OqwV BHIMMm/n1ajCaNIjMjUjk1+hWQFPcfR1EmxcL7yGtnZOhd157yW7to67rDjSe9rflnDN 4npDdV4YveUOwBIrkOIP97tbmKPivFlZP+GoVbcbuQ0+FI6/GiqBsTNwvkKCw7VYRlk2 e2ZDDiicYc0CJyB2VxfcBMR2KOFSC7lSHX5U2YEVZtnmG22T80nDl4XQ5rb7k2JkeZxn dInw== 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=UzAwSrCG1/T4H8lr5Ell4ANgtMYDLpxQaTlFqh0lzE8=; b=gdznRDLEJLEhYiAsW4TpnIp6C1sPnGfdCP/++rHnMVjsygMVn0mvJN+89cLv7dpgnM Sdwm0XL6f+vD7umk0Zu7o1oDFLNldf0snlXs5MuaTFXG3koGC4aqx4SURZ0I7NQYVyWT oGLYCrwVLHJchQEhBf8jtUM0XBP3AwTs7F1r15++1fcTFPeZfuLGVOio73KRbNQt9IFY lKhfe1SQZjDQqjx9SJxPuWh7aD5OIjtrHTZmsnQLaB1VhIO176VvP+sZ8ZuwVcvOkhqe LIZEAQZYhk8YDiIfI3yNBVPRTt2sqkds2Awg9D9PxON8zgPxBUxU7X9uot32WruLBmLq 5ihw== 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 d16si422999oti.42.2020.03.31.22.59.10; Tue, 31 Mar 2020 22:59: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 S1731783AbgDAFtA (ORCPT + 99 others); Wed, 1 Apr 2020 01:49:00 -0400 Received: from mga12.intel.com ([192.55.52.136]:26449 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731680AbgDAFtA (ORCPT ); Wed, 1 Apr 2020 01:49:00 -0400 IronPort-SDR: r+3BODFmMufW3RW++NP/1qV/WJiub9X6caTXzDePWiInSV0YZ53BtXB9RPcMDswsSUIGa+i1Zs 7nqsLadf1mkw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 22:48:58 -0700 IronPort-SDR: 7F7PdIS2xCZmhzkXLJ3uAcW5TFuJwjdoFIa5fbsUlAHxTjs+DLBgtElBuNQEzzo3uSmyUEzJO4 hqka6yWk4X3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,330,1580803200"; d="scan'208";a="238014662" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 31 Mar 2020 22:48:57 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 22:48:57 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 22:48:57 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.213]) with mapi id 14.03.0439.000; Wed, 1 Apr 2020 13:48:53 +0800 From: "Liu, Yi L" To: "Tian, Kevin" , "alex.williamson@redhat.com" , "eric.auger@redhat.com" CC: "jacob.jun.pan@linux.intel.com" , "joro@8bytes.org" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "jean-philippe@linaro.org" , "peterx@redhat.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" Subject: RE: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Topic: [PATCH v1 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free) Thread-Index: AQHWAEUbC4GB74LMekup8jIcF6WIFqhgVMYAgACL5QCAANaCgIAAmyhQgAD31QCAAIZ4AA== Date: Wed, 1 Apr 2020 05:48:52 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-2-git-send-email-yi.l.liu@intel.com> In-Reply-To: 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 PiBGcm9tOiBUaWFuLCBLZXZpbiA8a2V2aW4udGlhbkBpbnRlbC5jb20+DQo+IFNlbnQ6IFdlZG5l c2RheSwgQXByaWwgMSwgMjAyMCAxOjQzIFBNDQo+IFRvOiBMaXUsIFlpIEwgPHlpLmwubGl1QGlu dGVsLmNvbT47IGFsZXgud2lsbGlhbXNvbkByZWRoYXQuY29tOw0KPiBTdWJqZWN0OiBSRTogW1BB VENIIHYxIDEvOF0gdmZpbzogQWRkIFZGSU9fSU9NTVVfUEFTSURfUkVRVUVTVChhbGxvYy9mcmVl KQ0KPiANCj4gPiBGcm9tOiBMaXUsIFlpIEwgPHlpLmwubGl1QGludGVsLmNvbT4NCj4gPiBTZW50 OiBUdWVzZGF5LCBNYXJjaCAzMSwgMjAyMCA5OjIyIFBNDQo+ID4NCj4gPiA+IEZyb206IFRpYW4s IEtldmluIDxrZXZpbi50aWFuQGludGVsLmNvbT4NCj4gPiA+IFNlbnQ6IFR1ZXNkYXksIE1hcmNo IDMxLCAyMDIwIDE6NDEgUE0NCj4gPiA+IFRvOiBMaXUsIFlpIEwgPHlpLmwubGl1QGludGVsLmNv bT47IGFsZXgud2lsbGlhbXNvbkByZWRoYXQuY29tOw0KPiA+ID4gZXJpYy5hdWdlckByZWRoYXQu Y29tDQo+ID4gPiBTdWJqZWN0OiBSRTogW1BBVENIIHYxIDEvOF0gdmZpbzogQWRkDQo+ID4gVkZJ T19JT01NVV9QQVNJRF9SRVFVRVNUKGFsbG9jL2ZyZWUpDQo+ID4gPg0KPiA+ID4gPiBGcm9tOiBM aXUsIFlpIEwgPHlpLmwubGl1QGludG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