Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1468559ybb; Thu, 2 Apr 2020 01:06:46 -0700 (PDT) X-Google-Smtp-Source: APiQypLoEm4wLa7s258VOeIdvJahELBRWCd3PMXGAzUYL9haABJj0B2A6i/Fba9Y2QsWgRXx+V0b X-Received: by 2002:aca:54ca:: with SMTP id i193mr1337363oib.163.1585814806232; Thu, 02 Apr 2020 01:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585814806; cv=none; d=google.com; s=arc-20160816; b=0dlrlM5EbGicjfb/q2vC9soNlHCCEEI7384JcSPBqn1jmQ4VJV2qkgLIQ1QWG28AAL TRctgEGG4RWWBT5EC4G2tD01r8vuA6SaJiVNb8On2uZ9OC/YfxYsXRoXM6iKapCvcqNW ME2kRkxC0vFtUcvRow+JP62oShSS0t6pW9r8SoCV3nt8FZzVoyop80BuDLSctdhEWI2Q F3M4bfiecb3P0L/Za4ovl3KAbtjPhEdPYqmVbF80VYy+opuQoE5q/VWVBoJKIrzFLap7 Sau/nMG4xNH18xJc2QF55BXG3C5W9qq75PKIzf0Sot0K+mxGJL+3AdOzvdtm29/h1zS9 9zGw== 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=XtCThxIG2ArQ/kn1a7LGIEgalDxOBWvCGYI1cwdQigI=; b=AbpFlhDrIQaaxAh+lJ7NA1Vlj8RYoDlPOks/QA1eLoVFxCfXSDEj5OFhSA/MoMmjG4 wAGQvuzPvn7IL9Y5off126fXz2m6CJ07ZJSMp8NDxnLQsx5oc2u8lbRkKvUaPFT4qHvy OXgWTuR3iEi5O5vEq/l8DdB5ztiAqNLZAPxUgm46/l2fT/gp/a1VU1MiTrk7KBY39OEg NynuqzqQry27sw+E8CF/SmqsvISkEyhCz9BExyNVkR1PmJqntL5zoLYBSfnIPiSsZy3r AMCj2dWG5WMPoY0TFVDFHgR71wAm55aokYvD/zasQwLHpH6dp3qgABFQibHL9GNx9vQq 9Xvw== 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 97si1890454oth.209.2020.04.02.01.06.33; Thu, 02 Apr 2020 01:06:46 -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 S2387664AbgDBIFg (ORCPT + 99 others); Thu, 2 Apr 2020 04:05:36 -0400 Received: from mga03.intel.com ([134.134.136.65]:43234 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387552AbgDBIFg (ORCPT ); Thu, 2 Apr 2020 04:05:36 -0400 IronPort-SDR: xuveOYWAxja5wYwfaHotHHrQdYgkHczpRBvBUaIf9S1ba8nZjiBzRcF3wIZJBl7jBdjZ1HoAqU Zjp18BjAztKQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2020 01:05:35 -0700 IronPort-SDR: L/y5N/obk2BuIGhJoqWTjiqaDaMgiF9Kp88hThD40bDwuwmsvN+yv0/V2DX3jTs8dVVx1+xFYn kkUO86P6xhIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,335,1580803200"; d="scan'208";a="396277640" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 02 Apr 2020 01:05:34 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Apr 2020 01:05:34 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Apr 2020 01:05:34 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.22]) with mapi id 14.03.0439.000; Thu, 2 Apr 2020 16:05:29 +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 6/8] vfio/type1: Bind guest page tables to host Thread-Topic: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host Thread-Index: AQHWAEUdkW8K+/kg/06c7098DvJyv6hgm8wAgANYlCCAAK00AIAA6Iaw Date: Thu, 2 Apr 2020 08:05:29 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-7-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+IFNlbnQ6IFRodXJz ZGF5LCBBcHJpbCAyLCAyMDIwIDEwOjEyIEFNDQo+IFRvOiBMaXUsIFlpIEwgPHlpLmwubGl1QGlu dGVsLmNvbT47IGFsZXgud2lsbGlhbXNvbkByZWRoYXQuY29tOw0KPiBTdWJqZWN0OiBSRTogW1BB VENIIHYxIDYvOF0gdmZpby90eXBlMTogQmluZCBndWVzdCBwYWdlIHRhYmxlcyB0byBob3N0DQo+ IA0KPiA+IEZyb206IExpdSwgWWkgTCA8eWkubC5saXVAaW50ZWwuY29tPg0KPiA+IFNlbnQ6IFdl ZG5lc2RheSwgQXByaWwgMSwgMjAyMCA1OjEzIFBNDQo+ID4NCj4gPiA+IEZyb206IFRpYW4sIEtl dmluIDxrZXZpbi50aWFuQGludGVsLmNvbT4NCj4gPiA+IFNlbnQ6IE1vbmRheSwgTWFyY2ggMzAs IDIwMjAgODo0NiBQTQ0KPiA+ID4gU3ViamVjdDogUkU6IFtQQVRDSCB2MSA2LzhdIHZmaW8vdHlw ZTE6IEJpbmQgZ3Vlc3QgcGFnZSB0YWJsZXMgdG8NCj4gPiA+IGhvc3QNCj4gPiA+DQo+ID4gPiA+ IEZyb206IExpdSwgWWkgTCA8eWkubC5saXVAaW50ZWwuY29tPg0KPiA+ID4gPiBTZW50OiBTdW5k YXksIE1hcmNoIDIyLCAyMDIwIDg6MzIgUE0NCj4gPiA+ID4NCj4gPiA+ID4gRnJvbTogTGl1IFlp IEwgPHlpLmwubGl1QGludGVsLmNvbT4NCj4gPiA+ID4NCj4gPiA+ID4gVkZJT19UWVBFMV9ORVNU SU5HX0l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