From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 B0CEA21BC6A7F for ; Sun, 26 Mar 2017 23:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490595826; x=1522131826; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=KLr0OCawo6likBOvwrPMO1xoBKTo0TxkVcBZNqpO/FA=; b=JMj8Ij1U7RzJkEPQTGxlP1Ibgnh4EtFFp9MtZ4+rfsmM4yx1ts8sSSsa h1sSTSd3zVy0lcnz6MR9QSpWHyXyDQ==; Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2017 23:23:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,229,1486454400"; d="scan'208,217";a="1147303827" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 26 Mar 2017 23:23:46 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 26 Mar 2017 23:23:45 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 26 Mar 2017 23:23:44 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.42]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.253]) with mapi id 14.03.0248.002; Mon, 27 Mar 2017 14:23:43 +0800 From: "Ni, Ruiyu" To: "Yao, Jiewen" , "edk2-devel@lists.01.org" CC: Leo Duran , Brijesh Singh Thread-Topic: [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support. Thread-Index: AQHSpUo6pq+8Q3/dxkWzKCTsaKszNaGoLDgQ//+GLQCAAIcccA== Date: Mon, 27 Mar 2017 06:23:42 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8EC346@SHSMSX104.ccr.corp.intel.com> References: <1490434122-16200-1-git-send-email-jiewen.yao@intel.com> <1490434122-16200-4-git-send-email-jiewen.yao@intel.com> <734D49CCEBEEF84792F5B80ED585239D5B8EC287@SHSMSX104.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A9143FB@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503A9143FB@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US, zh-CN 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.22 Subject: Re: [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 06:23:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 IzEuIElmIFBjaUhvc3RCcmlkZ2UgZHJpdmVyIGRvZXNuJ3QgY29uc3VtZSBJT01NVSBwcm90b2Nv bCwgd2lsbCB0aGUgY2hhbmdlIGluIFBjaUJ1cyBkcml2ZXIgY2F1c2UgYW55DQogICAgICAgbmVn YXRpdmUgaW1wYWN0Pw0KIzIuIFBsZWFzZSBjaGVjayB0aGUgUGNpSG9zdEJyaWRnZUR4ZSBkcml2 ZXIgKHNlYXJjaGluZyDigJxNYXBz4oCdKS4gSXQgY29udGFpbnMgdGhlIGNvZGUgdG8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ICdhJywgJ3AnKQ0KPiArdHlwZWRlZiBzdHJ1Y3Qgew0KPiArICBVSU5UMzIgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBTaWduYXR1cmU7DQo+ICsgIFVJTlROICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE51bWJlck9mQnl0ZXM7DQo+ICsgIEVGSV9QSFlT SUNBTF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgIERldmljZUFkZHJlc3M7DQo+ICsgIFZP SUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpQY2lSb290QnJpZGdlSW9N YXBwaW5nOw0KPiArfSBQQ0lfSU9fTUFQX0lORk87DQo+DQo+ICAvLw0KPiAgLy8gR2xvYmFsIFZh cmlhYmxlcw0KPiBAQCAtMzE5LDYgKzMyNyw4IEBAIGV4dGVybiBVSU5UNjQgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBnQWxsT25lOw0KPiAgZXh0ZXJuIFVJTlQ2NCAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdBbGxaZXJvOw0KPiAgZXh0ZXJuIEVG SV9QQ0lfUExBVEZPUk1fUFJPVE9DT0wgICAgICAgICAgICAgICAgICAgICpnUGNpUGxhdGZvcm1Q cm90b2NvbDsNCj4gIGV4dGVybiBFRklfUENJX09WRVJSSURFX1BST1RPQ09MICAgICAgICAgICAg ICAgICAgICAqZ1BjaU92ZXJyaWRlUHJvdG9jb2w7DQo+ICtleHRlcm4gRURLSUlfSU9NTVVfUFJP VE9DT0wgICAgICAgICAgICAgICAgICAgICAgICAgKmdJb01tdVByb3RvY29sOw0KPiArZXh0ZXJu IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1Jb01tdVBhZ2VT aXplOw0KPiAgZXh0ZXJuIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG1SZXNlcnZlSXN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GNpSW9NYXBJbmZvID0gTWFwcGluZzsNCj4gKyAgICBpZiAoUGNpSW9NYXBJbmZvLT5T aWduYXR1cmUgIT0gUENJX0lPX01BUF9JTkZPX1NJR05BVFVSRSkgew0KPiArICAgICAgcmV0dXJu IEVGSV9JTlZBTElEX1BBUkFNRVRFUjsNCj4gKyAgICB9DQo+ICsgICAgTWFwcGluZyA9IFBjaUlv TWFwSW5mby0+UGNpUm9vdEJyaWRnZUlvTWFwcGluZzsNCj4gKyAgfQ0KPiArDQo+ICAgIFN0YXR1 cyA9IFBjaUlvRGV2aWNlLT5QY2lSb290QnJpZGdlSW8tPlVubWFwICgNCj4gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBjaUlvRGV2aWNlLT5QY2lSb290QnJpZGdl SW8sDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYXBwaW5n IEBAIC0xMDM3LDYgKzEwODksMjIgQEAgUGNpSW9Vbm1hcCAoDQo+ICAgICAgICApOw0KPiAgICB9 DQo+DQo+ICsgIGlmIChnSW9NbXVQcm90b2NvbCAhPSBOVUxMKSB7DQo+ICsgICAgaWYgKCFFRklf RVJST1IoU3RhdHVzKSkgew0KPiArICAgICAgLy8NCj4gKyAgICAgIC8vIFBjaUhvc3RCcmlkZ2Ug c2hvdWxkIG1hcCBJT01NVSBwYWdlIGFsaWduZWQgSG9zdEFkZHJlc3MuDQo+ICsgICAgICAvLw0K PiArICAgICAgZ0lvTW11UHJvdG9jb2wtPlNldEF0dHJpYnV0ZSAoDQo+ICsgICAgICAgICAgICAg ICAgICAgICAgICBnSW9NbXVQcm90b2NvbCwNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgIFBj aUlvRGV2aWNlLT5IYW5kbGUsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBQY2lJb01hcElu Zm8tPkRldmljZUFkZHJlc3MsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBBTElHTl9W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2VzKTsNCj4gKyAg ICAgIGdJb01tdVByb3RvY29sLT5TZXRBdHRyaWJ1dGUgKA0KPiArICAgICAgICAgICAgICAgICAg ICAgICAgZ0lvTW11UHJvdG9jb2wsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBQY2lJb0Rl dmljZS0+SGFuZGxlLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgKFVJTlROKUhvc3RBZGRy ZXNzLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgQUxJR05fVkFMVUUoU2l6ZSwgbUlvTW11 UGFnZVNpemUpLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgMA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgKTsNCj4gKyAgICB9DQo+ICsgIH0NCj4gICAgcmV0dXJuIFN0YXR1czsNCj4g IH0NCj4NCj4gLS0NCj4gMi43LjQud2luZG93cy4xDQo=