From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F3B6F8206A for ; Fri, 16 Dec 2016 05:44:31 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 16 Dec 2016 05:44:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,357,1477983600"; d="scan'208,217";a="203322000" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 16 Dec 2016 05:44:30 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 16 Dec 2016 05:44:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 16 Dec 2016 05:44:29 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.54]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.97]) with mapi id 14.03.0248.002; Fri, 16 Dec 2016 21:44:27 +0800 From: "Yao, Jiewen" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: Laszlo Ersek , "Fan, Jeff" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging Protection. Thread-Index: AQHSUIkGwGh4JtcMe0OpGdqAkYl8xKEI8sEAgAGwnAA= Date: Fri, 16 Dec 2016 13:44:26 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8C5ABA@shsmsx102.ccr.corp.intel.com> References: <1481115245-11880-1-git-send-email-jiewen.yao@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging Protection. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 13:44:32 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 WWVzLiAgVXNpbmcgTWVyZ2VNZW1vcnlNYXAgaXMgYSBnb29kIGlkZWEuDQoNCkkgd2lsbCBzZW5k IFYyIHBhdGNoLg0KDQpGcm9tOiBLaW5uZXksIE1pY2hhZWwgRA0KU2VudDogRnJpZGF5LCBEZWNl bWJlciAxNiwgMjAxNiAzOjU0IEFNDQpUbzogWWFvLCBKaWV3ZW4gPGppZXdlbi55YW9AaW50ZWwu Y29tPjsgZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmc7IEtpbm5leSwgTWljaGFlbCBEIDxtaWNoYWVs LmQua2lubmV5QGludGVsLmNvbT4NCkNjOiBMYXN6bG8gRXJzZWsgPGxlcnNla0ByZWRoYXQuY29t PjsgRmFuLCBKZWZmIDxqZWZmLmZhbkBpbnRlbC5jb20+DQpTdWJqZWN0OiBSRTogW2VkazJdIFtQ QVRDSF0gVWVmaUNwdVBrZy9QaVNtbUNwdTogQWRkIFNNTSBDb21tIEJ1ZmZlciBQYWdpbmcgUHJv dGVjdGlvbi4NCg0KSmlld2VuLA0KDQpTb21lIGNvbW1lbnRzIGluY2x1ZGVkIGJlbG93Lg0KDQpJ IHNlZSB5b3UgaGF2ZSBhZGRlZCBTb3J0TWVtb3J5TWFwKCkgZnJvbSBNZGVNb2R1bGVQa2dcQ29y ZVxEeGVcTWlzY1xQcm9wZXJ0aWVzVGFibGUuYy4NClRoYXQgc2FtZSBma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