From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.9623.1607053451255386711 for ; Thu, 03 Dec 2020 19:44:11 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ZyHCnXca; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: w.sheng@intel.com) IronPort-SDR: Rk9uGjRmSHEDTuNsNtiJA7SdHinJ1ny+5v+e5DKutPBcd/Jws15DoEvE//J16sEW6qobBsOTDc C6+JXnZn8jXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="152574107" X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208,217,223";a="152574107" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 19:44:07 -0800 IronPort-SDR: PB8De+nVfrRujimKry1YC15WT3UFX5WYJhg9SQkhNCZFXCOKfBXwOvT7lxHMraQvDnGd7nfMdi bmvkw6YBV3iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208,217,223";a="435696342" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga001.fm.intel.com with ESMTP; 03 Dec 2020 19:44:07 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 3 Dec 2020 19:44:06 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 3 Dec 2020 19:44:05 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 3 Dec 2020 19:44:05 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 3 Dec 2020 19:43:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3dkcZTa9wQz7lX7mF15O/dbYh4kpeNpuqaA0PXivbr1aT8smAqGYB80mYxpVfxGFzkxEKE4lKqB89Q2du9/g+EpfMXiLgZo7Hegch47V846wTFBW3NDuSqN7la7b96a1DINJjp5fL2tnQTozUurQHOkEGIIL4EVNnwF5JYhxM7Ki45HaePW/AeKEu1eSu1DqGr/AmVX+UM5HyPiwwisVNHQtPOX2wvbuwmJ0EwNC21MmFs7TOIUER9rRTDMoUdqNq+PVrdoMOzEXdYkG5Km8PmYUnbkDwLhnURNI6v30vtt5POCL/DVcjlemH8NBNhuvoduRhxK9buLSzNd8elUJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aFLQMzV3RSrVS3Z73CUr898vL9nzP9r6f2zV5ttnEwg=; b=JJ4I5x5Y1TvVIhhZUNrIzv9hSTWXw0OPOn8h+I3IPJRoS9Gfw0rnc9CB4D+7lE+tonQNyhlqtEXiFROH1N+AhQOkPcSXeQwy7Ca5kFdqlWDEQOPCXIt82PKNcdNPChjgUqVvej8aPGUbkt78i7j2K4Y+LXhC5d/yZi9G5DTDKXxxpgqsJ0Eey3PyLfKV7QycKJ3gV8LHP+vCuCn6rhArOM1vFtfu8orlV4xaN3g3FgYNGeHK91mc1jMKj4BvwgW7eZ8LkzlT+HPwccWI2wjPkVuG+D8lOS8ur/A5hd5qpkMNMDd93gjoYPwy03tPHF8ZI6KJsxOAtHC2v4ao0a8jgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aFLQMzV3RSrVS3Z73CUr898vL9nzP9r6f2zV5ttnEwg=; b=ZyHCnXcarpH1T6VlO+Jy3Bi/gD5bgXUEN/YJlpfNChWcG7IPNvsMmrFH6Ic8IkHAAbE/jkFaArGK/tltkq22mp9qkJu4RI/Uep0wwbnWPLHwji8vIlDR5ZR78/oVttftnq24QtN3eVUPoMLfWb6P8yTZp3E3zJKShVhOQFgY4So= Received: from CY4PR11MB1928.namprd11.prod.outlook.com (2603:10b6:903:11e::18) by CY4PR1101MB2136.namprd11.prod.outlook.com (2603:10b6:910:18::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.20; Fri, 4 Dec 2020 03:43:55 +0000 Received: from CY4PR11MB1928.namprd11.prod.outlook.com ([fe80::d922:f6a:d769:b5]) by CY4PR11MB1928.namprd11.prod.outlook.com ([fe80::d922:f6a:d769:b5%12]) with mapi id 15.20.3632.021; Fri, 4 Dec 2020 03:43:55 +0000 From: "Sheng Wei" To: "Huang, Jenny" , "Yao, Jiewen" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Chaganty, Rangasai V" , "Feng, Roger" Subject: Re: [PATCH v5] IntelSiliconPkg/VTd: Add iommu 5 level paging support Thread-Topic: [PATCH v5] IntelSiliconPkg/VTd: Add iommu 5 level paging support Thread-Index: AdbIV1Dp48imUm//Twe8QHBSqTQuoABlJhSAAADFBkA= Date: Fri, 4 Dec 2020 03:43:55 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-Mentions: jiewen.yao@intel.com X-MS-Has-Attach: yes X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a33be606-f34f-484a-f4c7-08d89806d37b x-ms-traffictypediagnostic: CY4PR1101MB2136: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: P9fJQ5RXkgjjCFGbGQnBSlHplTD7QJGq4HV2Ghz4bdQUUMlkpN/KWx2aGxFtVaSPvo+q5qCnRFFseDCK/ArYxqhoDawBQJP35Bi3KviKQAMl+TfYrKg0AY01x7u91tilu4qqAJBVPYza9Q7ZauIZEb3hQDT3632cXBKQGFkYrNGAQcE2oZuvczKP/0Vbba4Zej7X7QUN0pkDAW+ApWEgGRWQ8OdnVNmrAhUGmvQOzJjCO9Qatk9yBcyz8IXpZYUl/Ys7AD1c5Z8e7Ioi3e0EyxxK5PZ+s3R0wPUTgsCJ1fNGJTlPLpRdoXz6jOOgXDWuq964so1wyrLlHxRjHfocBJ9kMByss/lVqD19CrwYFqLZ+6ENG3MoROgt6CZCGlL2gTasqftFspbnw4E6OaCLEA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1928.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(376002)(39860400002)(366004)(396003)(346002)(64756008)(66946007)(66476007)(71200400001)(4326008)(53546011)(66556008)(99936003)(52536014)(76116006)(66616009)(54906003)(316002)(66446008)(110136005)(6506007)(55016002)(30864003)(86362001)(166002)(107886003)(83380400001)(186003)(9326002)(8676002)(8936002)(2906002)(26005)(9686003)(478600001)(966005)(7696005)(5660300002)(33656002)(559001)(579004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?gb2312?B?aVhGYUlUTlV6UmYrOVZ5RkU2SGhPRlQ3RG56QU4rdFNNbXo1bzFKQXlDYy9D?= =?gb2312?B?dWl3V21MK1RjWU44cFpXb3VJNGd6U3M2dWdrYTFtWEdoREx2dW81MnFjUldT?= =?gb2312?B?d0s2b3J3R1M3MUxhUUdOMmV0U3cvaGZDWnl5cGRCZko5cEplV3dLOWJDSEh1?= =?gb2312?B?eS9iRHNtZFZaUldVV0hnUFR1RHBhanFLL0I5eXY4d1o1eWJTdGRCb1kzVHRO?= =?gb2312?B?Y3pNSVB6V1BxWjc4WUZzd3E1NHd6YVdmYlBSa2VkRm9kQUFucHRiSThkeXRN?= =?gb2312?B?anY5aUFSSzhBTjFXczhtclp5MHNkQkdiTGlOcHdVclp5TS9zeDdvVjkvZldv?= =?gb2312?B?TUkrY2pVQVdoQWx1WVpPaVpHdkFJM3BPSUtSSWpkRVNFcERsWWFqMW96dkZZ?= =?gb2312?B?dmx6V0k1VkRVekd6V25SNXhxOENqZnlOUmkrUThhamdjTlNZOWJTN3YxMnBF?= =?gb2312?B?eVNPUzhtQjJpN3hkSFBDTFljdWJMekg3ZHJwamFmS2hWU0pPUUptMWZBRHJF?= =?gb2312?B?T1hBdXdtQTNjYWJGbE55ekxPN2Y4ck9QYWJmbWtHWjRoWDNReTB0N0lDZk45?= =?gb2312?B?d0FKeHB6VTBwTllSL0dyaFAvd1F5V0J1N3NuQ1N3OU9GazlxQk44U1RQTlk3?= =?gb2312?B?SkJFQ2gwNG9rRWIzUWNwT3Bob2ROajdjSko4WDVVZnVqL0dEOVBCQnVNR0lC?= =?gb2312?B?Z0tjVGovdUtvT1ltUjY2b28vM1IyaXJvVXFRa3I3MDJ3My9KQm8yaE9wR09y?= =?gb2312?B?Yjh1dUFCNkZ0R2IrUVFhSW50ZEVQVm9sUTRkanNSN0lVblVGMFVIMk51UWQ3?= =?gb2312?B?S1ppNk5OczkrN0xKelNGVkdxZ1BucVRJU0JKRVhqT1dvZDFEOVdad0tySFdu?= =?gb2312?B?cm5uaE1LS3NDdCt0Mk5tNWFwcnZvNGhscjBZSTgzdHRuRmNqK1ZWdU9MR0RZ?= =?gb2312?B?eW9VcnBvMlpMVWZ2TElrZkpGOUtPUkFTRFg4dmJVV1p6dXJoaGE4UGpTeSto?= =?gb2312?B?N0JxUnZsR0NMbkFDckFvbDRFR21oUk9PR2NVK3oyNHhDQUo2MTFkeWVYUFYr?= =?gb2312?B?aFgzeDg0YnF5QnVPRDEwYXBleFEya21YWTVNSGkwWXM5bmhWbGY0MGwwczZN?= =?gb2312?B?bEhHb3BPMVlpRFlaOCttNjVrSVRvRlkvV2VPVEJVcDJDTTlVRC9ONDVGU0U1?= =?gb2312?B?alY0NUJkRFBEcjNHbUJWQzdCS0tpdmQ0ZDQ5OUUxVFJ2cExDb1plMWpVOU1a?= =?gb2312?B?SEhxZHpHTnYwRnBjTUxuZkIrckhxOHd6SVdLMmpYNFhTRUg2aGxRUHFNTWxr?= =?gb2312?Q?TmsVNNJ0BlGA8=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1928.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a33be606-f34f-484a-f4c7-08d89806d37b X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2020 03:43:55.6397 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qude+An5rS1tydrTJ+Yt+wocrdX9DcHL8e87M7EHh7KYWZtTeQUI7vO/JN2xMuJury9JgsmrJ71+jTo3K49hHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2136 Return-Path: w.sheng@intel.com X-OriginatorOrg: intel.com X-Groupsio-MsgNum: 68317 Content-Language: en-US Content-Type: multipart/mixed; boundary="_004_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_" --_004_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_ Content-Type: multipart/alternative; boundary="_000_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_" --_000_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SGkgSmVubnksDQoNClRoYW5rIHlvdSBmb3IgdGhlIHJldmlldy4NCg0KSSBhZGQgeW91ciBuYW1l IHVuZGVyICIgUmV2aWV3ZWQtYnkgIiB0byB0aGUgcGF0Y2guDQoNCg0KDQpAWWFvLCBKaWV3ZW48 bWFpbHRvOmppZXdlbi55YW9AaW50ZWwuY29tPg0KDQpEbyB5b3UgaGF2ZSBtb3JlIGNvbW1lbnRz IGFib3V0IHRoaXMgcGF0Y2g/DQoNClRoYW5rIHlvdS4NCg0KQlINCg0KU2hlbmcgV2VpDQoNCg0K DQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQoNCj4gRnJvbTogSHVhbmcsIEplbm55IDxq ZW5ueS5odWFuZ0BpbnRlbC5jb20+DQoNCj4gU2VudDogMjAyMMTqMTLUwjTI1SAxMTozMw0KDQo+ IFRvOiBTaGVuZywgVyA8dy5zaGVuZ0BpbnRlbC5jb20+OyBZYW8sIEppZXdlbiA8amlld2VuLnlh b0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DY0ICAgICAgICAgICAgICAgICAgICAgICAgTWVtb3J5QmFzZSwNCg0KPiA+ID4g PiAgICBJTiBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAgICBNZW1vcnlMaW1pdCwNCg0KPiA+ ID4gPiAtICBJTiBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAgICBJb01tdUFjY2Vzcw0KDQo+ ID4gPiA+ICsgIElOIFVJTlQ2NCAgICAgICAgICAgICAgICAgICAgICAgIElvTW11QWNjZXNzLA0K DQo+ID4gPiA+ICsgIElOIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgIElzNUxldmVsUGFn aW5nDQoNCj4gPiA+ID4gICAgKQ0KDQo+ID4gPiA+ICB7DQoNCj4gPiA+ID4gKyAgVUlOVE4gICAg ICAgICAgICAgICAgICAgICAgICAgIEluZGV4NTsNCg0KPiA+ID4gPiAgICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgICAgICAgSW5kZXg0Ow0KDQo+ID4gPiA+ICAgIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgICBJbmRleDM7DQoNCj4gPiA+ID4gICAgVUlOVE4gICAgICAgICAgICAgICAg ICAgICAgICAgIEluZGV4MjsNCg0KPiA+ID4gPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgTHZsNVN0YXJ0Ow0KDQo+ID4gPiA+ICsgIFVJTlROICAgICAgICAgICAgICAgICAgICAg ICAgICBMdmw1RW5kOw0KDQo+ID4gPiA+ICsgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAg ICBMdmw0UGFnZXNTdGFydDsNCg0KPiA+ID4gPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgTHZsNFBhZ2VzRW5kOw0KDQo+ID4gPiA+ICAgIFVJTlROICAgICAgICAgICAgICAgICAg ICAgICAgICBMdmw0U3RhcnQ7DQoNCj4gPiA+ID4gICAgVUlOVE4gICAgICAgICAgICAgICAgICAg ICAgICAgIEx2bDRFbmQ7DQ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ZXZlbFBhZ2luZ0VudHJ5LCAgSU4gQk9PTEVBTiBJczVMZXZlbFBhZ2luZw0KDQo+ID4g PiA+ICAgICkNCg0KPiA+ID4gPiAgew0KDQo+ID4gPiA+ICsgIFVJTlROICAgICAgICAgICAgICAg ICAgICAgICAgICBJbmRleDU7DQoNCj4gPiA+ID4gICAgVUlOVE4gICAgICAgICAgICAgICAgICAg ICAgICAgIEluZGV4NDsNCg0KPiA+ID4gPiAgICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAg ICAgSW5kZXgzOw0KDQo+ID4gPiA+ICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICBJ bmRleDI7DQoNCj4gPiA+ID4gICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4 MTsNCg0KPiA+ID4gPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgTHZsNUluZGV4 RW5kOw0KDQo+ID4gPiA+ICsgIFZURF9TRUNPTkRfTEVWRUxfUEFHSU5HX0VOVFJZICAqTHZsNVB0 RW50cnk7DQoNCj4gPiA+ID4gICAgVlREX1NFQ09ORF9MRVZFTF9QQUdJTkdfRU5UUlkgICpMdmw0 UHRFbnRyeTsNCg0KPiA+ID4gPiAgICBWVERfU0VDT05EX0xFVkVMX1BBR0lOR19FTlRSWSAgKkx2 bDNQdEVudHJ5Ow0KDQo+ID4gPiA+ICAgIFZURF9TRUNPTkRfTEVWRUxfUEFHSU5HX0VOVFJZICAq THZsMlB0RW50cnk7IEBAIC0zODYsMzgNCg0KPiArNDYxLDUzDQoNCj4gPiA+IEBADQoNCj4gPiA+ ID4gRHVtcFNlY29uZExldmVsUGFnaW5nRW50cnkgKA0KDQo+ID4gPiA+DQoNCj4gPiA+ID4gICAg REVCVUcgKChERUJVR19WRVJCT1NFLCI9PT09PT09PT09PT09PT09XG4iKSk7DQoNCj4gPiA+ID4g ICAgREVCVUcgKChERUJVR19WRVJCT1NFLCJETUFSIFNlY29uZCBMZXZlbC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j4gPiA+ID4gew0KDQo+ID4gPiA+ICsgICAgICBERUJVRygoREVCVUdfRVJST1IsICIhISEhIFBh Z2UtdGFibGUgdHlwZSAweCVYIGlzIG5vdA0KDQo+ID4gPiA+ICsgc3VwcG9ydGVkIG9uDQoNCj4g PiA+ID4gVlREICVkICEhISFcbiIsIEluZGV4LCBtVnRkVW5pdEluZm9ybWF0aW9uW0luZGV4XS5D YXBSZWcuQml0cy5TQUdBVykpOw0KDQo+ID4gPiA+ICAgICAgICByZXR1cm4gOw0KDQo+ID4gPiA+ ICAgICAgfQ0KDQo+ID4gPiA+DQoNCj4gPiA+ID4gLS0NCg0KPiA+ID4gPiAyLjE2LjIud2luZG93 cy4xDQoNCg0K --_000_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Hi Jenny,

Thank you for the review.

I add your name under " Reviewed-by " t= o the patch.

 

@Yao, Jiewen

Do you have more comments about this patch?<= /o:p>

Thank you.

BR

Sheng Wei

 

> ----= -Original Message-----

> From= : Huang, Jenny <jenny.huang@intel.com>

> Sent= : 2020=C4=EA12=D4= =C24=C8=D5 11:33

> To: = Sheng, W <w.sheng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>= ;;

> deve= l@edk2.groups.io

> Cc: = Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V

> <= rangasai.v.chaganty@intel.com>; Feng, Roger <roger.feng@intel.com>=

> Subj= ect: RE: [PATCH v5] IntelSiliconPkg/VTd: Add iommu 5 level paging support

>

> Reviewed-by: Jenny Huang < jenny.huang@intel.com= >

>

> -----Original Message-----

> From: Sheng, W <w.sheng@i= ntel.com>

> Sent: Tuesday, December 1, 2020 7:03 PM

> To: Yao, Jiewen <jiewe= n.yao@intel.com>; devel@edk2.groups.io

> Cc: Ni, Ray <ray.ni@intel.= com>; Chaganty, Rangasai V

> <rangasai.v.c= haganty@intel.com>; Huang, Jenny <jenn= y.huang@intel.com>;

> Feng, Roger <roger.fen= g@intel.com>

> Subject: [PATCH v5] IntelSiliconPkg/VTd: Add= iommu 5 level paging support

>

> Hi Jiewen,

> About the patch of support 5 level paging io= mmu.

> Thank you for giving the review comments.

> I have done all the update.

> Could you give "review by" on this= patch ?

> Thank you.

> BR

> Sheng Wei

>

>

> > -----Original Message-----

> > From: Sheng, W

> > Sent: 2020=C4=EA11=D4=C224=C8=D5 13:44

> > To: Yao, Jiewen <= jiewen.yao@intel.com>; devel@edk2.groups.io

> > Cc: Ni, Ray <ray.ni@i= ntel.com>; Chaganty, Rangasai V

> > <rangasa= i.v.chaganty@intel.com>; Huang, Jenny <jenny.huang@intel.com>

> > Subject: RE: [PATCH v4] IntelSiliconPkg= /VTd: Add iommu 5 level paging

> > support

> >

> > Hi Jiewen, All,

> > Thank you for the review. I just check = and update the patch.

> > https://edk2.groups.i= o/g/devel/message/67865?p=3D,,,20,0,0,0::relevance,

> > ,posteri

> > d%3A2558558,20,2,0,78471874

> > Could we continue the patch review ?

> > BR

> > Sheng Wei

> >

> > > -----Original Message-----

> > > From: Yao, Jiewen <jiewen.yao@intel.com>

> > > Sent: 2020=C4=EA11=D4=C223=C8=D5 16:44

> > > To: Sheng, W <w= .sheng@intel.com>; devel@edk2.groups.io

> > > Cc: Ni, Ray <ray= .ni@intel.com>; Chaganty, Rangasai V

> > > <ra= ngasai.v.chaganty@intel.com>; Huang, Jenny

> > > <jenny.huan= g@intel.com>

> > > Subject: RE: [PATCH v4] IntelSilic= onPkg/VTd: Add iommu 5 level

> > > paging support

> > >

> > > Thanks.

> > >

> > > I only reviewed the policy part. C= omment below:

> > >

> > > 1) I recommend you can merge below= 2 if into one - if

> > > ((mAcpiDmarTable-

> > > >HostAddressWidth <=3D 48) &= amp;&

> > > (mVtdUnitInformation[VtdIndex].Cap= Reg.Bits.SAGAW & BIT2) !=3D 0)) {

> > > You can use 2 lines, but there is = no need to use 2 if.

> > >

> > > +      if= (mAcpiDmarTable->HostAddressWidth <=3D 48) {

> > > +     &nb= sp;  if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) = !=3D 0)

> {

> > > +     &nb= sp;    mVtdUnitInformation[VtdIndex].Is5LevelPaging =3D FALS= E;

> > > +     &nb= sp;  }

> > > +      }<= /p>

> > >

> > > 2) I think below code has typo.

> > > The DEBUG message about 4-level an= d 5-level should be reversed.

> > > Also we should use DEBUG_INFO inst= ead of DEBUG_ERROR.

> > >

> > > +    if (mVtdUnitIn= formation[VtdIndex].Is5LevelPaging) {

> > > +      Co= ntextEntry->Bits.AddressWidth =3D 0x3;

> > > +      DE= BUG((DEBUG_ERROR, "Using 4-level page-table on VTD %d\n",

> > > VtdIndex));

> > > +    } else {

> > > +      Co= ntextEntry->Bits.AddressWidth =3D 0x2;

> > > +      DE= BUG((DEBUG_ERROR, "Using 5-level page-table on VTD %d\n",

> > > VtdIndex));

> > > +    }

> > >

> > >

> > >

> > >

> > > > -----Original Message-----

> > > > From: Sheng, W <w.sheng@intel.com>

> > > > Sent: Monday, November 23, 20= 20 4:04 PM

> > > > To: devel@= edk2.groups.io

> > > > Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V

> > > > <rangasai.v.chaganty@intel.com>; Yao, Jiewen

> > > > <jiewen= .yao@intel.com>; Huang, Jenny <jenny.h= uang@intel.com>

> > > > Subject: [PATCH v4] IntelSili= conPkg/VTd: Add iommu 5 level paging

> > > > support

> > > >

> > > > Support iommu 5 level paging = for translation table.

> > > >

> > > > REF: https://bugzilla.tian= ocore.org/show_bug.cgi?id=3D3067

> > > >

> > > > Signed-off-by: Sheng Wei <= w.sheng@intel.com>

> > > > Cc: Ray Ni <ray.ni@intel.com>

> > > > Cc: Rangasai V Chaganty <<= a href=3D"mailto:rangasai.v.chaganty@intel.com">rangasai.v.chaganty@intel.com>

> > > > Cc: Jiewen Yao <jiewen.yao@intel.com>

> > > > Cc: Jenny Huang <jenny.huang@intel.com>

> > > > ---

> > > >  .../Feature/VTd/IntelVT= dDxe/DmaProtection.c        |  = ; 4 +-

> > > >  .../Feature/VTd/IntelVT= dDxe/DmaProtection.h        |  19 += -

> > > >  .../Feature/VTd/IntelVT= dDxe/TranslationTable.c     | 281

> > +++++++++++++++--

> > > > ----

> > > >  .../Feature/VTd/IntelVT= dDxe/TranslationTableEx.c   |  31 ++-

> > > >  .../Feature/VTd/IntelVT= dDxe/VtdReg.c          &n= bsp;    |  10 +-

> > > >  5 files changed, 245 in= sertions(+), 100 deletions(-)

> > > >

> > > > diff --git

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > c

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > c

> > > > index 9b6135ef..628565ee 1006= 44

> > > > ---

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > c

> > > > +++

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > c

> > > > @@ -523,10 +523,10 @@ SetupVt= d (

> > > >    for (Index = =3D 0; Index < mVtdUnitNumber; Index++) {

> > > >     = DEBUG ((DEBUG_INFO,"VTD Unit %d (Segment: %04x)\n", Index,

> > > > mVtdUnitInformation[Index].Se= gment));

> > > >     = if (mVtdUnitInformation[Index].ExtRootEntryTable !=3D NULL) {

> > > > -    &nbs= p; DumpDmarExtContextEntryTable

> > > > (mVtdUnitInformation[Index].E= xtRootEntryTable);

> > > > +    &nbs= p; DumpDmarExtContextEntryTable

> > > > (mVtdUnitInformation[Index].E= xtRootEntryTable,

> > > > mVtdUnitInformation[Index].Is= 5LevelPaging);

> > > >     = }

> > > >     = if (mVtdUnitInformation[Index].RootEntryTable !=3D NULL) {

> > > > -    &nbs= p; DumpDmarContextEntryTable

> > > > (mVtdUnitInformation[Index].R= ootEntryTable);

> > > > +    &nbs= p; DumpDmarContextEntryTable

> > > > (mVtdUnitInformation[Index].R= ootEntryTable,

> > > > mVtdUnitInformation[Index].Is= 5LevelPaging);

> > > >     = }

> > > >    }

> > > >

> > > > diff --git

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > h

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > h

> > > > index a3331db8..f641cea0 1006= 44

> > > > ---

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > h

> > > > +++

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/DmaProtection.

> > > > h

> > > > @@ -77,6 +77,7 @@ typedef str= uct {

> > > >    BOOLEAN&nbs= p;            &= nbsp;            Has= DirtyContext;

> > > >    BOOLEAN&nbs= p;            &= nbsp;            Has= DirtyPages;

> > > >    PCI_DEVICE_= INFORMATION           Pci= DeviceInfo;

> > > > +  BOOLEAN  &n= bsp;            = ;           Is5LevelPagin= g;

> > > >  } VTD_UNIT_INFORMATION;=

> > > >

> > > >  //

> > > > @@ -375,31 +376,37 @@ ParseDm= arAcpiTableRmrr (

> > > >  /**

> > > >    Dump DMAR c= ontext entry table.

> > > >

> > > > -  @param[in]  Root= Entry DMAR root entry.

> > > > +  @param[in]  Root= Entry       DMAR root entry.

> > > > +  @param[in]  Is5L= evelPaging  If it is the 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpDmarContextEntryTab= le (

> > > > -  IN VTD_ROOT_ENTRY *Ro= otEntry

> > > > +  IN VTD_ROOT_ENTRY *Ro= otEntry,

> > > > +  IN BOOLEAN Is5LevelPa= ging

> > > >    );

> > > >

> > > >  /**

> > > >    Dump DMAR e= xtended context entry table.

> > > >

> > > > -  @param[in]  ExtR= ootEntry DMAR extended root entry.

> > > > +  @param[in]  ExtR= ootEntry    DMAR extended root entry.

> > > > +  @param[in]  Is5L= evelPaging  If it is the 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpDmarExtContextEntry= Table (

> > > > -  IN VTD_EXT_ROOT_ENTRY= *ExtRootEntry

> > > > +  IN VTD_EXT_ROOT_ENTRY= *ExtRootEntry,  IN BOOLEAN Is5LevelPaging

> > > >    );

> > > >

> > > >  /**

> > > >    Dump DMAR s= econd level paging entry.

> > > >

> > > > -  @param[in]  Seco= ndLevelPagingEntry The second level paging entry.

> > > > +  @param[in]  Seco= ndLevelPagingEntry  The second level paging entry.

> > > > +  @param[in]  Is5L= evelPaging          If it is t= he 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpSecondLevelPagingEn= try (

> > > > -  IN VOID *SecondLevelP= agingEntry

> > > > +  IN VOID *SecondLevelP= agingEntry,  IN BOOLEAN Is5LevelPaging

> > > >    );

> > > >

> > > >  /**

> > > > diff --git

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/Translatio

> > > > nT

> > > > ab

> > > > le.c

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/Translatio

> > > > nT

> > > > ab

> > > > le.c

> > > > index 201d663d..6c786b40 1006= 44

> > > > ---

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/Translatio

> > > > nT

> > > > ab

> > > > le.c

> > > > +++

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/Translatio

> > > > nT ab le.c @@ -128,11 +128,26= @@ CreateContextEntry (

> > > >

> > > >      = ;DEBUG ((DEBUG_INFO,"Source: S%04x B%02x D%02x F%02x\n",

> > > > mVtdUnitInformation[VtdIndex]= .Segment, SourceId.Bits.Bus,

> > > > SourceId.Bits.Device, SourceI= d.Bits.Function));

> > > >

> > > > -    if ((mVtd= UnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0)

> {

> > > > -    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on

> > > > VTD %d !!!!\n", VtdIndex= ));

> > > > +    mVtdUnitI= nformation[VtdIndex].Is5LevelPaging =3D FALSE;

> > > > +    if ((mVtd= UnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT3) !=3D 0)

> {

> > > > +    &nbs= p; mVtdUnitInformation[VtdIndex].Is5LevelPaging =3D TRUE;

> > > > +    &nbs= p; if (mAcpiDmarTable->HostAddressWidth <=3D 48) {

> > > > +    &nbs= p;   if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW &

> > > > + BIT2) !=3D 0)

> > {

> > > > +    &nbs= p;     mVtdUnitInformation[VtdIndex].Is5LevelPaging =3D= FALSE;

> > > > +    &nbs= p;   }

> > > > +    &nbs= p; }

> > > > +    } else if= ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW &

> > > > + BIT2) =3D=3D

> > > > 0) {

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! Page-table type is not supported

> > > > + on

> > > > VTD %d !!!!\n", VtdIndex= ));

> > > >     =    return EFI_UNSUPPORTED;

> > > >     = }

> > > > -    ContextEn= try->Bits.AddressWidth =3D 0x2;

> > > > +

> > > > +    if (mVtdU= nitInformation[VtdIndex].Is5LevelPaging) {

> > > > +    &nbs= p; ContextEntry->Bits.AddressWidth =3D 0x3;

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "Using 4-level page-table on VTD %d\n",

> > > > VtdIndex));

> > > > +    } else {<= /p>

> > > > +    &nbs= p; ContextEntry->Bits.AddressWidth =3D 0x2;

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "Using 5-level page-table on VTD %d\n",

> > > > VtdIndex));

> > > > +    }

> > > >    }

> > > >

> > > >    FlushPageTa= bleMemory (VtdIndex,

> > > > (UINTN)mVtdUnitInformation[Vt= dIndex].RootEntryTable,

> > > > EFI_PAGES_TO_SIZE(EntryTableP= ages));

> > > > @@ -148,6 +163,7 @@ CreateCon= textEntry (

> > > >    @param[in]&= nbsp; MemoryBase          = ;        The base of the memory.

> > > >    @param[in]&= nbsp; MemoryLimit         &nbs= p;       The limit of the memory.

> > > >    @param[in]&= nbsp; IoMmuAccess         &nbs= p;       The IOMMU access.

> > > > +  @param[in]  Is5L= evelPaging           = ;   If it is the 5 level paging.

> > > >

> > > >    @return The= second level paging entry.

> > > >  **/

> > > > @@ -157,16 +173,23 @@ CreateS= econdLevelPagingEntryTable (

> > > >    IN VTD_SECO= ND_LEVEL_PAGING_ENTRY *SecondLevelPagingEntry,

> > > >    IN UINT64&n= bsp;            = ;           MemoryBase,

> > > >    IN UINT64&n= bsp;            = ;           MemoryLimit,<= /p>

> > > > -  IN UINT64  =             &nb= sp;         IoMmuAccess

> > > > +  IN UINT64  =              &n= bsp;        IoMmuAccess,

> > > > +  IN BOOLEAN  = ;            &n= bsp;        Is5LevelPaging

> > > >    )

> > > >  {

> > > > +  UINTN  &nbs= p;            &= nbsp;          Index5;

> > > >    UINTN =             &nb= sp;            Index= 4;

> > > >    UINTN =             &nb= sp;            Index= 3;

> > > >    UINTN =             &nb= sp;            Index= 2;

> > > > +  UINTN  &nbs= p;            &= nbsp;          Lvl5Start;

> > > > +  UINTN  &nbs= p;            &= nbsp;          Lvl5End;

> > > > +  UINTN  &nbs= p;            &= nbsp;          Lvl4PagesStart;=

> > > > +  UINTN  &nbs= p;            &= nbsp;          Lvl4PagesEnd;

> > > >    UINTN =             &nb= sp;            Lvl4S= tart;

> > > >    UINTN =             &nb= sp;            Lvl4E= nd;

> > > >    UINTN =             &nb= sp;            Lvl3S= tart;

> > > >    UINTN =             &nb= sp;            Lvl3E= nd;

> > > > +  VTD_SECOND_LEVEL_PAGI= NG_ENTRY  *Lvl5PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl4PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl3PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl2PtEntry; @@ -184,7 +207,7

> > > @@

> > > > CreateSecondLevelPagingEntryT= able (

> > > >    if (SecondL= evelPagingEntry =3D=3D NULL) {

> > > >     = SecondLevelPagingEntry =3D AllocateZeroPages (1);

> > > >     = if (SecondLevelPagingEntry =3D=3D NULL) {

> > > > -    &nbs= p; DEBUG ((DEBUG_ERROR,"Could not Alloc LVL4 PT. \n"));

> > > > +     &nb= sp;DEBUG ((DEBUG_ERROR,"Could not Alloc LVL4 or LVL5 PT.

> > > > + \n"));

> > > >     =    return NULL;

> > > >     = }

> > > >     = FlushPageTableMemory (VtdIndex,

> > > > (UINTN)SecondLevelPagingEntry= , EFI_PAGES_TO_SIZE(1)); @@ -197,66

> > > > +220,109 @@ CreateSecondLevel= PagingEntryTable (

> > > >     = return SecondLevelPagingEntry;

> > > >    }

> > > >

> > > > -  Lvl4Start =3D RShiftU= 64 (BaseAddress, 39) & 0x1FF;

> > > > -  Lvl4End =3D RShiftU64= (EndAddress - 1, 39) & 0x1FF;

> > > > +  if (Is5LevelPaging) {=

> > > > +    Lvl5Start= =3D RShiftU64 (BaseAddress, 48) & 0x1FF;

> > > > +    Lvl5End = =3D RShiftU64 (EndAddress - 1, 48) & 0x1FF;

> > > > +    DEBUG ((D= EBUG_INFO,"  Lvl5Start - 0x%x, Lvl5End - 0x%x\n",

> > > > + Lvl5Start,

> > > > Lvl5End));

> > > >

> > > > -  DEBUG ((DEBUG_INFO,&q= uot;  Lvl4Start - 0x%x, Lvl4End - 0x%x\n",

> > > > Lvl4Start, Lvl4End));

> > > > +    Lvl4Start= =3D RShiftU64 (BaseAddress, 39) & 0x1FF;

> > > > +    Lvl4End = =3D RShiftU64 (EndAddress - 1, 39) & 0x1FF;

> > > >

> > > > -  Lvl4PtEntry =3D (VTD_= SECOND_LEVEL_PAGING_ENTRY

> > > > *)SecondLevelPagingEntry;

> > > > -  for (Index4 =3D Lvl4S= tart; Index4 <=3D Lvl4End; Index4++) {

> > > > -    if (Lvl4P= tEntry[Index4].Uint64 =3D=3D 0) {

> > > > -    &nbs= p; Lvl4PtEntry[Index4].Uint64 =3D (UINT64)(UINTN)AllocateZeroPages (1);

> > > > -    &nbs= p; if (Lvl4PtEntry[Index4].Uint64 =3D=3D 0) {

> > > > -    &nbs= p;   DEBUG ((DEBUG_ERROR,"!!!!!! ALLOCATE LVL4 PAGE FAIL

> > > > (0x%x)!!!!!!\n", Index4)= );

> > > > -    &nbs= p;   ASSERT(FALSE);

> > > > -    &nbs= p;   return NULL;

> > > > -    &nbs= p; }

> > > > -    &nbs= p; FlushPageTableMemory (VtdIndex,

> (UINTN)Lvl4PtEntry[Index4].Uint64,

> > > > SIZE_4KB);

> > > > -    &nbs= p; SetSecondLevelPagingEntryAttribute (&Lvl4PtEntry[Index4],

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > -    }

> > > > +    Lvl4Pages= Start =3D (Lvl5Start<<9) | Lvl4Start;

> > > > +    Lvl4Pages= End =3D (Lvl5End<<9) | Lvl4End;

> > > > +    DEBUG ((D= EBUG_INFO,"  Lvl4PagesStart - 0x%x, Lvl4PagesEnd -

> > > > + 0x%x\n",

> > > > Lvl4PagesStart, Lvl4PagesEnd)= );

> > > >

> > > > -    Lvl3Start= =3D RShiftU64 (BaseAddress, 30) & 0x1FF;

> > > > -    if (ALIGN= _VALUE_LOW(BaseAddress + SIZE_1GB, SIZE_1GB) <=3D

> > > > EndAddress) {

> > > > -    &nbs= p; Lvl3End =3D SIZE_4KB/sizeof(VTD_SECOND_LEVEL_PAGING_ENTRY) - 1;

> > > > -    } else {<= /p>

> > > > -    &nbs= p; Lvl3End =3D RShiftU64 (EndAddress - 1, 30) & 0x1FF;

> > > > +    Lvl5PtEnt= ry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)SecondLevelPagingEntry;

> > > > +  } else {

> > > > +    Lvl5Start= =3D RShiftU64 (BaseAddress, 48) & 0x1FF;

> > > > +    Lvl5End = =3D Lvl5Start;

> > > > +

> > > > +    Lvl4Start= =3D RShiftU64 (BaseAddress, 39) & 0x1FF;

> > > > +    Lvl4End = =3D RShiftU64 (EndAddress - 1, 39) & 0x1FF;

> > > > +    DEBUG ((D= EBUG_INFO,"  Lvl4Start - 0x%x, Lvl4End - 0x%x\n",

> > > > + Lvl4Start,

> > > > Lvl4End));

> > > > +

> > > > +    Lvl4PtEnt= ry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)SecondLevelPagingEntry;

> > > > +  }

> > > > +

> > > > +  for (Index5 =3D Lvl5S= tart; Index5 <=3D Lvl5End; Index5++) {

> > > > +    if (Is5Le= velPaging) {

> > > > +    &nbs= p; if (Lvl5PtEntry[Index5].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;   Lvl5PtEntry[Index5].Uint64 =3D (UINT64)(UINTN)AllocateZeroPa= ges (1);

> > > > +    &nbs= p;   if (Lvl5PtEntry[Index5].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;     DEBUG ((DEBUG_ERROR,"!!!!!! ALLOCATE LVL4 P= AGE FAIL

> > > > (0x%x)!!!!!!\n", Index5)= );

> > > > +    &nbs= p;     ASSERT(FALSE);

> > > > +    &nbs= p;     return NULL;

> > > > +    &nbs= p;   }

> > > > +    &nbs= p;   FlushPageTableMemory (VtdIndex,

> > > > + (UINTN)Lvl5PtEntry[Index5].= Uint64,

> > > > SIZE_4KB);

> > > > +    &nbs= p;   SetSecondLevelPagingEntryAttribute (&Lvl5PtEntry[Index5]= ,

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > +    &nbs= p; }

> > > > +    &nbs= p; Lvl4Start =3D Lvl4PagesStart & 0x1FF;

> > > > +    &nbs= p; if (((Index5+1)<<9) > Lvl4PagesEnd) {

> > > > +    &nbs= p;   Lvl4End =3D SIZE_4KB/sizeof(VTD_SECOND_LEVEL_PAGING_ENTRY) -=

> 1;;

> > > > +    &nbs= p;   Lvl4PagesStart =3D (Index5+1)<<9;

> > > > +    &nbs= p; } else {

> > > > +     &nb= sp;  Lvl4End =3D Lvl4PagesEnd & 0x1FF;

> > > > +    &nbs= p; }

> > > > +    &nbs= p; DEBUG ((DEBUG_INFO,"  Lvl5(0x%x): Lvl4Start - 0x%x, Lvl4End

> > > > + - 0x%x\n",

> > > > Index5, Lvl4Start, Lvl4End));=

> > > > +    &nbs= p; Lvl4PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl5PtEntry[Index5].Bits.AddressLo,

> > > > Lvl5PtEntry[Index5].Bits.Addr= essHi);

> > > >     = }

> > > > -    DEBUG ((D= EBUG_INFO,"  Lvl4(0x%x): Lvl3Start - 0x%x, Lvl3End -

> 0x%x\n",

> > > > Index4, Lvl3Start, Lvl3End));=

> > > >

> > > > -    Lvl3PtEnt= ry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl4PtEntry[Index4].Bits.AddressLo,

> > > > Lvl4PtEntry[Index4].Bits.Addr= essHi);

> > > > -    for (Inde= x3 =3D Lvl3Start; Index3 <=3D Lvl3End; Index3++) {

> > > > -    &nbs= p; if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > > -    &nbs= p;   Lvl3PtEntry[Index3].Uint64 =3D (UINT64)(UINTN)AllocateZeroPa= ges (1);

> > > > -    &nbs= p;   if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > > -    &nbs= p;     DEBUG ((DEBUG_ERROR,"!!!!!! ALLOCATE LVL3 P= AGE FAIL (0x%x,

> > > > 0x%x)!!!!!!\n", Index4, = Index3));

> > > > +    for (Inde= x4 =3D Lvl4Start; Index4 <=3D Lvl4End; Index4++) {

> > > > +    &nbs= p; if (Lvl4PtEntry[Index4].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;   Lvl4PtEntry[Index4].Uint64 =3D (UINT64)(UINTN)AllocateZeroPa= ges (1);

> > > > +    &nbs= p;   if (Lvl4PtEntry[Index4].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;     DEBUG ((DEBUG_ERROR,"!!!!!! ALLOCATE LVL4 P= AGE FAIL

> > > > (0x%x)!!!!!!\n", Index4)= );

> > > >     =        ASSERT(FALSE);

> > > >     =        return NULL;

> > > >     =      }

> > > > -    &nbs= p;   FlushPageTableMemory (VtdIndex,

> (UINTN)Lvl3PtEntry[Index3].Uint64,

> > > > SIZE_4KB);

> > > > -    &nbs= p;   SetSecondLevelPagingEntryAttribute (&Lvl3PtEntry[Index3]= ,

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > +    &nbs= p;   FlushPageTableMemory (VtdIndex,

> > > > + (UINTN)Lvl4PtEntry[Index4].= Uint64,

> > > > SIZE_4KB);

> > > > +    &nbs= p;   SetSecondLevelPagingEntryAttribute (&Lvl4PtEntry[Index4]= ,

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > +    &nbs= p; }

> > > > +

> > > > +    &nbs= p; Lvl3Start =3D RShiftU64 (BaseAddress, 30) & 0x1FF;

> > > > +    &nbs= p; if (ALIGN_VALUE_LOW(BaseAddress + SIZE_1GB, SIZE_1GB) <=3D

> > > > EndAddress) {

> > > > +    &nbs= p;   Lvl3End =3D SIZE_4KB/sizeof(VTD_SECOND_LEVEL_PAGING_ENTRY) -=

> 1;

> > > > +    &nbs= p; } else {

> > > > +    &nbs= p;   Lvl3End =3D RShiftU64 (EndAddress - 1, 30) & 0x1FF;

> > > >     =    }

> > > > +    &nbs= p; DEBUG ((DEBUG_INFO,"  Lvl4(0x%x): Lvl3Start - 0x%x, Lvl3End

> > > > + - 0x%x\n",

> > > > Index4, Lvl3Start, Lvl3End));=

> > > >

> > > > -    &nbs= p; Lvl2PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl3PtEntry[Index3].Bits.AddressLo,

> > > > Lvl3PtEntry[Index3].Bits.Addr= essHi);

> > > > -    &nbs= p; for (Index2 =3D 0; Index2 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index2++) {

> > > > -    &nbs= p;   Lvl2PtEntry[Index2].Uint64 =3D BaseAddress;

> > > > -    &nbs= p;   SetSecondLevelPagingEntryAttribute (&Lvl2PtEntry[Index2]= ,

> > > > IoMmuAccess);

> > > > -    &nbs= p;   Lvl2PtEntry[Index2].Bits.PageSize =3D 1;

> > > > -    &nbs= p;   BaseAddress +=3D SIZE_2MB;

> > > > +    &nbs= p; Lvl3PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl4PtEntry[Index4].Bits.AddressLo,

> > > > Lvl4PtEntry[Index4].Bits.Addr= essHi);

> > > > +    &nbs= p; for (Index3 =3D Lvl3Start; Index3 <=3D Lvl3End; Index3++) {

> > > > +    &nbs= p;   if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;     Lvl3PtEntry[Index3].Uint64 =3D (UINT64)(UINTN)Al= locateZeroPages

> (1);

> > > > +    &nbs= p;     if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;       DEBUG ((DEBUG_ERROR,"!!!!!! ALL= OCATE LVL3 PAGE FAIL

> > > > + (0x%x,

> > > > 0x%x)!!!!!!\n", Index4, = Index3));

> > > > +    &nbs= p;       ASSERT(FALSE);

> > > > +    &nbs= p;       return NULL;

> > > > +    &nbs= p;     }

> > > > +    &nbs= p;     FlushPageTableMemory (VtdIndex,

> > > > + (UINTN)Lvl3PtEntry[Index3].= Uint64,

> > > > SIZE_4KB);

> > > > +    &nbs= p;     SetSecondLevelPagingEntryAttribute

> > > > + (&Lvl3PtEntry[Index3],<= /p>

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > +    &nbs= p;   }

> > > > +

> > > > +    &nbs= p;   Lvl2PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl3PtEntry[Index3].Bits.AddressLo,

> > > > Lvl3PtEntry[Index3].Bits.Addr= essHi);

> > > > +    &nbs= p;   for (Index2 =3D 0; Index2 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index2++) {

> > > > +    &nbs= p;     Lvl2PtEntry[Index2].Uint64 =3D BaseAddress;

> > > > +    &nbs= p;     SetSecondLevelPagingEntryAttribute

> > > > + (&Lvl2PtEntry[Index2],<= /p>

> > > > IoMmuAccess);

> > > > +    &nbs= p;     Lvl2PtEntry[Index2].Bits.PageSize =3D 1;

> > > > +    &nbs= p;     BaseAddress +=3D SIZE_2MB;

> > > > +    &nbs= p;     if (BaseAddress >=3D MemoryLimit) {

> > > > +     &nb= sp;      break;

> > > > +    &nbs= p;     }

> > > > +    &nbs= p;   }

> > > > +    &nbs= p;   FlushPageTableMemory (VtdIndex, (UINTN)Lvl2PtEntry,

> > > > + SIZE_4KB);

> > > >     =      if (BaseAddress >=3D MemoryLimit) {

> > > >     =        break;

> > > >     =      }

> > > >     =    }

> > > > -    &nbs= p; FlushPageTableMemory (VtdIndex, (UINTN)Lvl2PtEntry, SIZE_4KB);

> > > > +    &nbs= p; FlushPageTableMemory (VtdIndex,

> > > > + (UINTN)&Lvl3PtEntry[Lvl= 3Start],

> > > > (UINTN)&Lvl3PtEntry[Lvl3E= nd + 1] - (UINTN)&Lvl3PtEntry[Lvl3Start]);

> > > >     =    if (BaseAddress >=3D MemoryLimit) {

> > > >     =      break;

> > > >     =    }

> > > >     = }

> > > > -    FlushPage= TableMemory (VtdIndex, (UINTN)&Lvl3PtEntry[Lvl3Start],

> > > > (UINTN)&Lvl3PtEntry[Lvl3E= nd + 1] - (UINTN)&Lvl3PtEntry[Lvl3Start]);

> > > > -    if (BaseA= ddress >=3D MemoryLimit) {

> > > > -    &nbs= p; break;

> > > > -    }

> > > > +    FlushPage= TableMemory (VtdIndex,

> > > > + (UINTN)&Lvl4PtEntry[Lvl= 4Start],

> > > > (UINTN)&Lvl4PtEntry[Lvl4E= nd + 1] - (UINTN)&Lvl4PtEntry[Lvl4Start]);

> > > >    }

> > > > -  FlushPageTableMemory = (VtdIndex, (UINTN)&Lvl4PtEntry[Lvl4Start],

> > > > (UINTN)&Lvl4PtEntry[Lvl4E= nd + 1] -

> > > > (UINTN)&Lvl4PtEntry[Lvl4S= tart]);

> > > > +  FlushPageTableMemory = (VtdIndex, (UINTN)&Lvl5PtEntry[Lvl5Start],

> > > > (UINTN)&Lvl5PtEntry[Lvl5E= nd + 1] -

> > > > (UINTN)&Lvl5PtEntry[Lvl5S= tart]);

> > > >

> > > >    return Seco= ndLevelPagingEntry;

> > > >  }

> > > > @@ -266,26 +332,28 @@ CreateS= econdLevelPagingEntryTable (

> > > >

> > > >    @param[in]&= nbsp; VtdIndex          &= nbsp;         The index of the VTd = engine.

> > > >    @param[in]&= nbsp; IoMmuAccess         &nbs= p;       The IOMMU access.

> > > > +  @param[in]  Is5L= evelPaging           = ;   If it is the 5 level paging.

> > > >

> > > >    @return The= second level paging entry.

> > > >  **/

> > > >  VTD_SECOND_LEVEL_PAGING= _ENTRY *

> > > >  CreateSecondLevelPaging= Entry (

> > > >    IN UINTN&nb= sp;  VtdIndex,

> > > > -  IN UINT64  IoMmu= Access

> > > > +  IN UINT64  IoMmu= Access,

> > > > +  IN BOOLEAN Is5LevelPa= ging

> > > >    )

> > > >  {

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY *SecondLevelPagingEntry;

> > > >

> > > >    SecondLevel= PagingEntry =3D NULL;

> > > > -  SecondLevelPagingEntr= y =3D CreateSecondLevelPagingEntryTable

> > > > (VtdIndex, SecondLevelPagingE= ntry, 0, mBelow4GMemoryLimit,

> > > > IoMmuAccess);

> > > > +  SecondLevelPagingEntr= y =3D CreateSecondLevelPagingEntryTable

> > > > + (VtdIndex,

> > > > SecondLevelPagingEntry, 0, mB= elow4GMemoryLimit, IoMmuAccess,

> > > > Is5LevelPaging);

> > > >    if (SecondL= evelPagingEntry =3D=3D NULL) {

> > > >     = return NULL;

> > > >    }

> > > >

> > > >    if (mAbove4= GMemoryLimit !=3D 0) {

> > > >     = ASSERT (mAbove4GMemoryLimit > BASE_4GB);

> > > > -    SecondLev= elPagingEntry =3D CreateSecondLevelPagingEntryTable

> > (VtdIndex,

> > > > SecondLevelPagingEntry, SIZE_= 4GB, mAbove4GMemoryLimit,

> > IoMmuAccess);

> > > > +    SecondLev= elPagingEntry =3D CreateSecondLevelPagingEntryTable

> > > > + (VtdIndex,

> > > > SecondLevelPagingEntry, SIZE_= 4GB, mAbove4GMemoryLimit,

> > > > IoMmuAccess, Is5LevelPaging);=

> > > >     = if (SecondLevelPagingEntry =3D=3D NULL) {

> > > >     =    return NULL;

> > > >     = }

> > > > @@ -326,11 +394,13 @@ SetupTr= anslationTable (

> > > >  /**

> > > >    Dump DMAR c= ontext entry table.

> > > >

> > > > -  @param[in]  Root= Entry DMAR root entry.

> > > > +  @param[in]  Root= Entry       DMAR root entry.

> > > > +  @param[in]  Is5L= evelPaging  If it is the 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpDmarContextEntryTab= le (

> > > > -  IN VTD_ROOT_ENTRY *Ro= otEntry

> > > > +  IN VTD_ROOT_ENTRY *Ro= otEntry,

> > > > +  IN BOOLEAN Is5LevelPa= ging

> > > >    )

> > > >  {

> > > >    UINTN =             &nb= sp;   Index;

> > > > @@ -359,7 +429,7 @@ DumpDmarC= ontextEntryTable (

> > > >     =    if (ContextEntry[Index2].Bits.Present =3D=3D 0) {

> > > >     =      continue;

> > > >     =    }

> > > > -    &nbs= p; DumpSecondLevelPagingEntry ((VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(C= ontextEntry[Index2].Bits.SecondLevelP

> > > > ag

> > > > e

> > > > TranslationPointerLo,

> > > > ContextEntry[Index2].Bits.Sec= ondLevelPageTranslationPointerHi));

> > > > +    &nbs= p; DumpSecondLevelPagingEntry ((VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(C= ontextEntry[Index2].Bits.SecondLevelP

> > > > ag

> > > > e

> > > > TranslationPointerLo,

> > > > ContextEntry[Index2].Bits.Sec= ondLevelPageTranslationPointerHi),

> > > > Is5LevelPaging);

> > > >     = }

> > > >    }

> > > >    DEBUG ((DEB= UG_INFO,"=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D\n"));

> > > > @@ -368,17 +438,22 @@ DumpDma= rContextEntryTable (

> > > >  /**

> > > >    Dump DMAR s= econd level paging entry.

> > > >

> > > > -  @param[in]  Seco= ndLevelPagingEntry The second level paging entry.

> > > > +  @param[in]  Seco= ndLevelPagingEntry  The second level paging entry.

> > > > +  @param[in]  Is5L= evelPaging          If it is t= he 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpSecondLevelPagingEn= try (

> > > > -  IN VOID *SecondLevelP= agingEntry

> > > > +  IN VOID *SecondLevelP= agingEntry,  IN BOOLEAN Is5LevelPaging

> > > >    )

> > > >  {

> > > > +  UINTN  &nbs= p;            &= nbsp;          Index5;

> > > >    UINTN =             &nb= sp;            Index= 4;

> > > >    UINTN =             &nb= sp;            Index= 3;

> > > >    UINTN =             &nb= sp;            Index= 2;

> > > >    UINTN =             &nb= sp;            Index= 1;

> > > > +  UINTN   &nb= sp;            =           Lvl5IndexEnd;

> > > > +  VTD_SECOND_LEVEL_PAGI= NG_ENTRY  *Lvl5PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl4PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl3PtEntry;

> > > >    VTD_SECOND_= LEVEL_PAGING_ENTRY  *Lvl2PtEntry; @@ -386,38

> +461,53

> > > @@

> > > > DumpSecondLevelPagingEntry (<= /p>

> > > >

> > > >    DEBUG ((DEB= UG_VERBOSE,"=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\n"))= ;

> > > >    DEBUG ((DEB= UG_VERBOSE,"DMAR Second Level Page Table:\n"));

> > > > +  DEBUG ((DEBUG_VERBOSE= ,"SecondLevelPagingEntry Base - 0x%x,

> > > > Is5LevelPaging - %d\n", = SecondLevelPagingEntry, Is5LevelPaging));

> > > >

> > > > -  DEBUG ((DEBUG_VERBOSE= ,"SecondLevelPagingEntry Base - 0x%x\n",

> > > > SecondLevelPagingEntry));

> > > > +  Lvl5IndexEnd =3D Is5L= evelPaging ?

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY) : 1;

> > > >    Lvl4PtEntry= =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)SecondLevelPagingEntry;

> > > > -  for (Index4 =3D 0; In= dex4 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index4++) {

> > > > -    if (Lvl4P= tEntry[Index4].Uint64 !=3D 0) {

> > > > -    &nbs= p; DEBUG ((DEBUG_VERBOSE,"  Lvl4Pt Entry(0x%03x) - 0x%016lx\n&quo= t;,

> > Index4,

> > > > Lvl4PtEntry[Index4].Uint64));=

> > > > -    }

> > > > -    if (Lvl4P= tEntry[Index4].Uint64 =3D=3D 0) {

> > > > -    &nbs= p; continue;

> > > > -    }

> > > > -    Lvl3PtEnt= ry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl4PtEntry[Index4].Bits.AddressLo,

> > > > Lvl4PtEntry[Index4].Bits.Addr= essHi);

> > > > -    for (Inde= x3 =3D 0; Index3 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index3++) {

> > > > -    &nbs= p; if (Lvl3PtEntry[Index3].Uint64 !=3D 0) {

> > > > -    &nbs= p;   DEBUG ((DEBUG_VERBOSE,"    Lvl3Pt Entry(= 0x%03x) - 0x%016lx\n",

> > > > Index3, Lvl3PtEntry[Index3].U= int64));

> > > > +  Lvl5PtEntry =3D (VTD_= SECOND_LEVEL_PAGING_ENTRY

> > > > *)SecondLevelPagingEntry;

> > > > +

> > > > +  for (Index5 =3D 0; In= dex5 < Lvl5IndexEnd; Index5++) {

> > > > +    if (Is5Le= velPaging) {

> > > > +    &nbs= p; if (Lvl5PtEntry[Index5].Uint64 !=3D 0) {

> > > > +    &nbs= p;   DEBUG ((DEBUG_VERBOSE,"  Lvl5Pt Entry(0x%03x) -

> > > > + 0x%016lx\n",

> > > > Index5, Lvl5PtEntry[Index5].U= int64));

> > > >     =    }

> > > > -    &nbs= p; if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > > +    &nbs= p; if (Lvl5PtEntry[Index5].Uint64 =3D=3D 0) {

> > > >     =      continue;

> > > >     =    }

> > > > +    &nbs= p; Lvl4PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl5PtEntry[Index5].Bits.AddressLo,

> > > > Lvl5PtEntry[Index5].Bits.Addr= essHi);

> > > > +    }

> > > >

> > > > -    &nbs= p; Lvl2PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl3PtEntry[Index3].Bits.AddressLo,

> > > > Lvl3PtEntry[Index3].Bits.Addr= essHi);

> > > > -    &nbs= p; for (Index2 =3D 0; Index2 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index2++) {

> > > > -    &nbs= p;   if (Lvl2PtEntry[Index2].Uint64 !=3D 0) {

> > > > -    &nbs= p;     DEBUG ((DEBUG_VERBOSE,"   &n= bsp;  Lvl2Pt Entry(0x%03x) -

> 0x%016lx\n",

> > > > Index2, Lvl2PtEntry[Index2].U= int64));

> > > > +    for (Inde= x4 =3D 0; Index4 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index4++) {

> > > > +    &nbs= p; if (Lvl4PtEntry[Index4].Uint64 !=3D 0) {

> > > > +    &nbs= p;   DEBUG ((DEBUG_VERBOSE,"  Lvl4Pt Entry(0x%03x) -

> > > > + 0x%016lx\n",

> > > > Index4, Lvl4PtEntry[Index4].U= int64));

> > > > +    &nbs= p; }

> > > > +    &nbs= p; if (Lvl4PtEntry[Index4].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;   continue;

> > > > +    &nbs= p; }

> > > > +    &nbs= p; Lvl3PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl4PtEntry[Index4].Bits.AddressLo,

> > > > Lvl4PtEntry[Index4].Bits.Addr= essHi);

> > > > +    &nbs= p; for (Index3 =3D 0; Index3 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index3++) {

> > > > +    &nbs= p;   if (Lvl3PtEntry[Index3].Uint64 !=3D 0) {

> > > > +    &nbs= p;     DEBUG ((DEBUG_VERBOSE,"   Lvl3Pt = Entry(0x%03x) - 0x%016lx\n",

> > > > Index3, Lvl3PtEntry[Index3].U= int64));

> > > >     =      }

> > > > -    &nbs= p;   if (Lvl2PtEntry[Index2].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;   if (Lvl3PtEntry[Index3].Uint64 =3D=3D 0) {

> > > >      = ;      continue;

> > > >     =      }

> > > > -    &nbs= p;   if (Lvl2PtEntry[Index2].Bits.PageSize =3D=3D 0) {

> > > > -    &nbs= p;     Lvl1PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl2PtEntry[Index2].Bits.AddressLo,

> > > > Lvl2PtEntry[Index2].Bits.Addr= essHi);

> > > > -    &nbs= p;     for (Index1 =3D 0; Index1 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index1++) {

> > > > -    &nbs= p;       if (Lvl1PtEntry[Index1].Uint64 !=3D = 0) {

> > > > -    &nbs= p;         DEBUG ((DEBUG_VERBOSE,&q= uot;        Lvl1Pt Entry(0x%03x) -

> > > 0x%016lx\n",

> > > > Index1, Lvl1PtEntry[Index1].U= int64));

> > > > +

> > > > +    &nbs= p;   Lvl2PtEntry =3D (VTD_SECOND_LEVEL_PAGING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl3PtEntry[Index3].Bits.AddressLo,

> > > > Lvl3PtEntry[Index3].Bits.Addr= essHi);

> > > > +     &nb= sp;  for (Index2 =3D 0; Index2 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index2++) {

> > > > +    &nbs= p;     if (Lvl2PtEntry[Index2].Uint64 !=3D 0) {

> > > > +    &nbs= p;       DEBUG ((DEBUG_VERBOSE," &n= bsp;  Lvl2Pt Entry(0x%03x) -

> 0x%016lx\n",

> > > > Index2, Lvl2PtEntry[Index2].U= int64));

> > > > +    &nbs= p;     }

> > > > +    &nbs= p;     if (Lvl2PtEntry[Index2].Uint64 =3D=3D 0) {

> > > > +    &nbs= p;       continue;

> > > > +    &nbs= p;     }

> > > > +    &nbs= p;     if (Lvl2PtEntry[Index2].Bits.PageSize =3D=3D 0) = {

> > > > +    &nbs= p;       Lvl1PtEntry =3D (VTD_SECOND_LEVEL_PA= GING_ENTRY

> > > > *)(UINTN)VTD_64BITS_ADDRESS(L= vl2PtEntry[Index2].Bits.AddressLo,

> > > > Lvl2PtEntry[Index2].Bits.Addr= essHi);

> > > > +    &nbs= p;       for (Index1 =3D 0; Index1 <

> > > > SIZE_4KB/sizeof(VTD_SECOND_LE= VEL_PAGING_ENTRY); Index1++) {

> > > > +    &nbs= p;         if (Lvl1PtEntry[Index1].= Uint64 !=3D 0) {

> > > > +    &nbs= p;           DEBUG ((DEBU= G_VERBOSE,"      Lvl1Pt Entry(0x%03x) -

> > > 0x%016lx\n",

> > > > Index1, Lvl1PtEntry[Index1].U= int64));

> > > > +    &nbs= p;         }

> > > >     =          }

> > > >     =        }

> > > >     =      }

> > > > @@ -510,6 +600,7 @@ PageAttri= buteToLength (

> > > >    @param[in]&= nbsp;  VtdIndex         &= nbsp;       The index used to identify a VTd<= /p>

> engine.

> > > >    @param[in]&= nbsp;  SecondLevelPagingEntry   The second level paging entr= y in

> > > > VTd table for the device.

> > > >    @param[in]&= nbsp;  Address         &n= bsp;        The address to be checked.

> > > > +  @param[in]  = ; Is5LevelPaging          = ; If it is the 5 level paging.

> > > >    @param[out]=   PageAttributes         =   The page attribute of the page

> entry.

> > > >

> > > >    @return The= page entry.

> > > > @@ -519,6 +610,7 @@ GetSecond= LevelPageTableEntry (

> > > >    IN  UI= NTN            =              Vt= dIndex,

> > > >    IN  VT= D_SECOND_LEVEL_PAGING_ENTRY *SecondLevelPagingEntry,

> > > >    IN  PH= YSICAL_ADDRESS          &= nbsp;   Address,

> > > > +  IN  BOOLEAN = ;            &n= bsp;         Is5LevelPaging,

> > > >    OUT PAGE_AT= TRIBUTE           &n= bsp;    *PageAttribute

> > > >    )

> > > >  {

> > > > @@ -526,17 +618,38 @@ GetSeco= ndLevelPageTableEntry (

> > > >    UINTN =             &nb= sp;   Index2;

> > > >    UINTN =             &nb= sp;   Index3;

> > > >    UINTN =             &nb= sp;   Index4;

> > > > +  UINTN  &nbs= p;            &= nbsp; Index5;

> > > >    UINT64 = ;            &n= bsp;  *L1PageTable;

> > > >    UINT64 = ;            &n= bsp;  *L2PageTable;

> > > >    UINT64 = ;            &n= bsp;  *L3PageTable;

> > > >    UINT64 = ;            &n= bsp;  *L4PageTable;

> > > > +  UINT64  &nb= sp;            = *L5PageTable;

> > > >

> > > > +  Index5 =3D ((UINTN)RS= hiftU64 (Address, 48)) &

> > > > + PAGING_VTD_INDEX_MASK;

> > > >    Index4 =3D = ((UINTN)RShiftU64 (Address, 39)) &

> PAGING_VTD_INDEX_MASK;

> > > >    Index3 =3D = ((UINTN)Address >> 30) & PAGING_VTD_INDEX_MASK;

> > > >    Index2 =3D = ((UINTN)Address >> 21) & PAGING_VTD_INDEX_MASK;

> > > >    Index1 =3D = ((UINTN)Address >> 12) & PAGING_VTD_INDEX_MASK;

> > > >

> > > > -  L4PageTable =3D (UINT= 64 *)SecondLevelPagingEntry;

> > > > +  if (Is5LevelPaging) {=

> > > > +    L5PageTab= le =3D (UINT64 *)SecondLevelPagingEntry;

> > > > +    if (L5Pag= eTable[Index5] =3D=3D 0) {

> > > > +    &nbs= p; L5PageTable[Index5] =3D (UINT64)(UINTN)AllocateZeroPages (1);

> > > > +    &nbs= p; if (L5PageTable[Index5] =3D=3D 0) {

> > > > +    &nbs= p;   DEBUG ((DEBUG_ERROR,"!!!!!! ALLOCATE LVL5 PAGE FAIL

> > > > (0x%x)!!!!!!\n", Index4)= );

> > > > +    &nbs= p;   ASSERT(FALSE);

> > > > +    &nbs= p;   *PageAttribute =3D PageNone;

> > > > +    &nbs= p;   return NULL;

> > > > +    &nbs= p; }

> > > > +    &nbs= p; FlushPageTableMemory (VtdIndex, (UINTN)L5PageTable[Index5],

> > > > SIZE_4KB);

> > > > +    &nbs= p; SetSecondLevelPagingEntryAttribute

> > > > ((VTD_SECOND_LEVEL_PAGING_ENT= RY *)&L5PageTable[Index5],

> > > > EDKII_IOMMU_ACCESS_READ | EDK= II_IOMMU_ACCESS_WRITE);

> > > > +    &nbs= p; FlushPageTableMemory (VtdIndex,

> > > > + (UINTN)&L5PageTable[Ind= ex5],

> > > > sizeof(L5PageTable[Index5]));=

> > > > +    }

> > > > +    L4PageTab= le =3D (UINT64 *)(UINTN)(L5PageTable[Index5] &

> > > > PAGING_4K_ADDRESS_MASK_64);

> > > > +  } else {

> > > > +    L4PageTab= le =3D (UINT64 *)SecondLevelPagingEntry;  }

> > > > +

> > > >    if (L4PageT= able[Index4] =3D=3D 0) {

> > > >     = L4PageTable[Index4] =3D (UINT64)(UINTN)AllocateZeroPages (1);

> > > >     = if (L4PageTable[Index4] =3D=3D 0) { @@ -785,7 +898,7 @@

> > > > SetSecondLevelPagingAttribute= (

> > > >    }

> > > >

> > > >    while (Leng= th !=3D 0) {

> > > > -    PageEntry= =3D GetSecondLevelPageTableEntry (VtdIndex,

> > > > SecondLevelPagingEntry, BaseA= ddress, &PageAttribute);

> > > > +    PageEntry= =3D GetSecondLevelPageTableEntry (VtdIndex,

> > > > SecondLevelPagingEntry, BaseA= ddress,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging, &PageAttribute);

> > > >     = if (PageEntry =3D=3D NULL) {

> > > >     =    DEBUG ((DEBUG_ERROR, "PageEntry - NULL\n"));

> > > >     =    return RETURN_UNSUPPORTED;

> > > > @@ -913,7 +1026,7 @@ SetAcces= sAttribute (

> > > >

> > > >    if (ExtCont= extEntry !=3D NULL) {

> > > >     = if (ExtContextEntry->Bits.Present =3D=3D 0) {

> > > > -    &nbs= p; SecondLevelPagingEntry =3D CreateSecondLevelPagingEntry (VtdIndex,

> 0);

> > > > +    &nbs= p; SecondLevelPagingEntry =3D CreateSecondLevelPagingEntry

> > > > + (VtdIndex, 0,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging);

> > > >     =    DEBUG ((DEBUG_VERBOSE,"SecondLevelPagingEntry - 0x%x (S%0= 4x

> > > > B%02x D%02x F%02x) New\n"= ;, SecondLevelPagingEntry, Segment,

> > > > SourceId.Bits.Bus, SourceId.B= its.Device, SourceId.Bits.Function));

> > > >     =    Pt =3D (UINT64)RShiftU64

> > > > ((UINT64)(UINTN)SecondLevelPa= gingEntry,

> > > > 12);

> > > >

> > > > @@ -922,7 +1035,7 @@ SetAcces= sAttribute (

> > > >     =    ExtContextEntry->Bits.DomainIdentifier =3D DomainIdentifier= ;

> > > >     =    ExtContextEntry->Bits.Present =3D 1;

> > > >     =    FlushPageTableMemory (VtdIndex, (UINTN)ExtContextEntry,

> > > > sizeof(*ExtContextEntry));

> > > > -    &nbs= p; DumpDmarExtContextEntryTable

> > > > (mVtdUnitInformation[VtdIndex= ].ExtRootEntryTable);

> > > > +    &nbs= p; DumpDmarExtContextEntryTable

> > > > (mVtdUnitInformation[VtdIndex= ].ExtRootEntryTable,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging);

> > > >     =    mVtdUnitInformation[VtdIndex].HasDirtyContext =3D TRUE;

> > > >     = } else {

> > > >     =    SecondLevelPagingEntry =3D (VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(E= xtContextEntry-

> > > > >Bits.SecondLevelPageTrans= lationPointerLo, ExtContextEntry-

> > > > >Bits.SecondLevelPageTrans= lationPointerHi);

> > > > @@ -930,7 +1043,7 @@ SetAcces= sAttribute (

> > > >     = }

> > > >    } else if (= ContextEntry !=3D NULL) {

> > > >     = if (ContextEntry->Bits.Present =3D=3D 0) {

> > > > -    &nbs= p; SecondLevelPagingEntry =3D CreateSecondLevelPagingEntry (VtdIndex,

> 0);

> > > > +    &nbs= p; SecondLevelPagingEntry =3D CreateSecondLevelPagingEntry

> > > > + (VtdIndex, 0,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging);

> > > >     =    DEBUG ((DEBUG_VERBOSE,"SecondLevelPagingEntry - 0x%x (S%0= 4x

> > > > B%02x D%02x F%02x) New\n"= ;, SecondLevelPagingEntry, Segment,

> > > > SourceId.Bits.Bus, SourceId.B= its.Device, SourceId.Bits.Function));

> > > >     =    Pt =3D (UINT64)RShiftU64

> > > > ((UINT64)(UINTN)SecondLevelPa= gingEntry,

> > > > 12);

> > > >

> > > > @@ -939,7 +1052,7 @@ SetAcces= sAttribute (

> > > >     =    ContextEntry->Bits.DomainIdentifier =3D DomainIdentifier;

> > > >     =    ContextEntry->Bits.Present =3D 1;

> > > >     =    FlushPageTableMemory (VtdIndex, (UINTN)ContextEntry,

> > > > sizeof(*ContextEntry));

> > > > -    &nbs= p; DumpDmarContextEntryTable

> > > > (mVtdUnitInformation[VtdIndex= ].RootEntryTable);

> > > > +    &nbs= p; DumpDmarContextEntryTable

> > > > (mVtdUnitInformation[VtdIndex= ].RootEntryTable,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging);

> > > >     =    mVtdUnitInformation[VtdIndex].HasDirtyContext =3D TRUE;

> > > >     = } else {

> > > >     =    SecondLevelPagingEntry =3D (VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(C= ontextEntry-

> > > > >Bits.SecondLevelPageTrans= lationPointerLo, ContextEntry-

> > > > >Bits.SecondLevelPageTrans= lationPointerHi);

> > > > @@ -1000,7 +1113,7 @@ AlwaysE= nablePageAttribute (

> > > >

> > > >    if (mVtdUni= tInformation[VtdIndex].FixedSecondLevelPagingEntry =3D=3D 0) {

> > > >     = DEBUG((DEBUG_INFO, "CreateSecondLevelPagingEntry - %d\n",

> > > > VtdIndex));

> > > > -    mVtdUnitI= nformation[VtdIndex].FixedSecondLevelPagingEntry =3D

> > > > CreateSecondLevelPagingEntry = (VtdIndex, EDKII_IOMMU_ACCESS_READ |

> > > > EDKII_IOMMU_ACCESS_WRITE);

> > > > +    mVtdUnitI= nformation[VtdIndex].FixedSecondLevelPagingEntry =3D

> > > > CreateSecondLevelPagingEntry = (VtdIndex, EDKII_IOMMU_ACCESS_READ |

> > > > EDKII_IOMMU_ACCESS_WRITE,

> > > > mVtdUnitInformation[VtdIndex]= .Is5LevelPaging);

> > > >    }

> > > >

> > > >    SecondLevel= PagingEntry =3D

> > > > mVtdUnitInformation[VtdIndex]= .FixedSecondLevelPagingEntry;

> > > > diff --git

> > > >

> a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/= IntelVTdDxe/TranslationTableEx.

> > > > c

> > > >

> b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/= IntelVTdDxe/TranslationTableEx.

> > > > c

> > > > index 0ed9e3ca..a4466891 1006= 44

> > > > ---

> > > >

> a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/= IntelVTdDxe/TranslationTableEx.

> > > > c

> > > > +++

> > > >

> b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/= IntelVTdDxe/TranslationTableEx.

> > > > c

> > > > @@ -78,11 +78,28 @@ CreateExt= ContextEntry (

> > > >

> > > >     = DEBUG ((DEBUG_INFO,"DOMAIN: S%04x, B%02x D%02x F%02x\n",

> > > > mVtdUnitInformation[VtdIndex]= .Segment, SourceId.Bits.Bus,

> > > > SourceId.Bits.Device, SourceI= d.Bits.Function));

> > > >

> > > > -    if ((mVtd= UnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT2) =3D=3D 0)

> {

> > > > -    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on

> > > > VTD %d !!!!\n", VtdIndex= ));

> > > > +    mVtdUnitI= nformation[VtdIndex].Is5LevelPaging =3D FALSE;

> > > > +    if ((mVtd= UnitInformation[VtdIndex].CapReg.Bits.SAGAW & BIT3) !=3D 0)

> {

> > > > +    &nbs= p; mVtdUnitInformation[VtdIndex].Is5LevelPaging =3D TRUE;

> > > > +    &nbs= p; if (mAcpiDmarTable->HostAddressWidth <=3D 48) {

> > > > +    &nbs= p;   if ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW &

> > > > + BIT2) !=3D 0)

> > {

> > > > +    &nbs= p;     mVtdUnitInformation[VtdIndex].Is5LevelPaging =3D= FALSE;

> > > > +    &nbs= p;   }

> > > > +    &nbs= p; }

> > > > +    } else if= ((mVtdUnitInformation[VtdIndex].CapReg.Bits.SAGAW &

> > > > + BIT2) =3D=3D

> > > > 0) {

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! Page-table type is not supported

> > > > + on

> > > > VTD %d !!!!\n", VtdIndex= ));

> > > >     =    return EFI_UNSUPPORTED;

> > > >     = }

> > > > -    ExtContex= tEntry->Bits.AddressWidth =3D 0x2;

> > > > +

> > > > +    if (mVtdU= nitInformation[VtdIndex].Is5LevelPaging) {

> > > > +    &nbs= p; ExtContextEntry->Bits.AddressWidth =3D 0x3;

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "Using 4-level page-table on VTD %d\n",

> > > > VtdIndex));

> > > > +    } else {<= /p>

> > > > +    &nbs= p; ExtContextEntry->Bits.AddressWidth =3D 0x2;

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "Using 5-level page-table on VTD %d\n",

> > > > VtdIndex));

> > > > +    }

> > > > +

> > > > +

> > > >    }

> > > >

> > > >    FlushPageTa= bleMemory (VtdIndex,

> > > > (UINTN)mVtdUnitInformation[Vt= dIndex].ExtRootEntryTable,

> > > > EFI_PAGES_TO_SIZE(EntryTableP= ages));

> > > > @@ -93,11 +110,13 @@ CreateEx= tContextEntry (

> > > >  /**

> > > >    Dump DMAR e= xtended context entry table.

> > > >

> > > > -  @param[in]  ExtR= ootEntry DMAR extended root entry.

> > > > +  @param[in]  ExtR= ootEntry    DMAR extended root entry.

> > > > +  @param[in]  Is5L= evelPaging  If it is the 5 level paging.

> > > >  **/

> > > >  VOID

> > > >  DumpDmarExtContextEntry= Table (

> > > > -  IN VTD_EXT_ROOT_ENTRY= *ExtRootEntry

> > > > +  IN VTD_EXT_ROOT_ENTRY= *ExtRootEntry,  IN BOOLEAN Is5LevelPaging

> > > >    )

> > > >  {

> > > >    UINTN =             &nb= sp;   Index;

> > > > @@ -127,7 +146,7 @@ DumpDmarE= xtContextEntryTable (

> > > >     =    if (ExtContextEntry[Index2].Bits.Present =3D=3D 0) {

> > > >     =      continue;

> > > >     =    }

> > > > -    &nbs= p; DumpSecondLevelPagingEntry ((VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(E= xtContextEntry[Index2].Bits.SecondLev

> > > > el

> > > > Pa

> > > > geTranslationPointerLo,

> > > > ExtContextEntry[Index2].Bits.= SecondLevelPageTranslationPointerHi))

> > > > ;

> > > > +    &nbs= p; DumpSecondLevelPagingEntry ((VOID

> > > > *)(UINTN)VTD_64BITS_ADDRESS(E= xtContextEntry[Index2].Bits.SecondLev

> > > > el

> > > > Pa

> > > > geTranslationPointerLo,

> > > > ExtContextEntry[Index2].Bits.= SecondLevelPageTranslationPointerHi),

> > > > Is5LevelPaging);

> > > >     = }

> > > >

> > > >     = if (ExtRootEntry[Index].Bits.UpperPresent =3D=3D 0) { diff --git

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/VtdReg.c

> > > > b/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/VtdReg.c

> > > > index 699639ba..686d235f 1006= 44

> > > > ---

> > > > a/Silicon/Intel/IntelSiliconP= kg/Feature/VTd/IntelVTdDxe/VtdReg.c

> > > > +++ b/Silicon/Intel/IntelSili= conPkg/Feature/VTd/IntelVTdDxe/VtdReg

> > > > +++ .c

> > > > @@ -174,8 +174,14 @@ PrepareV= tdConfig (

> > > >     = if ((mVtdUnitInformation[Index].CapReg.Bits.SLLPS & BIT0) =3D=3D 0) {<= /p>

> > > >     =    DEBUG((DEBUG_WARN, "!!!! 2MB super page is not supported = on

> > > > VTD %d !!!!\n", Index));=

> > > >     = }

> > > > -    if ((mVtd= UnitInformation[Index].CapReg.Bits.SAGAW & BIT2) =3D=3D 0) {

> > > > -    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! 4-level page-table is not supported on

> > > > VTD %d !!!!\n", Index));=

> > > > +    if ((mVtd= UnitInformation[Index].CapReg.Bits.SAGAW & BIT3) !=3D 0) {

> > > > +    &nbs= p; DEBUG((DEBUG_INFO, "Support 5-level page-table on VTD

> > > > + %d\n",

> > > > Index));

> > > > +    }

> > > > +    if ((mVtd= UnitInformation[Index].CapReg.Bits.SAGAW & BIT2) !=3D 0) {

> > > > +    &nbs= p; DEBUG((DEBUG_INFO, "Support 4-level page-table on VTD

> > > > + %d\n",

> > > > Index));

> > > > +    }

> > > > +    if ((mVtd= UnitInformation[Index].CapReg.Bits.SAGAW & (BIT3 |

> > > > + BIT2)) =3D=3D 0)

> > > > {

> > > > +    &nbs= p; DEBUG((DEBUG_ERROR, "!!!! Page-table type 0x%X is not

> > > > + supported on

> > > > VTD %d !!!!\n", Index, m= VtdUnitInformation[Index].CapReg.Bits.SAGAW));

> > > >     =    return ;

> > > >     = }

> > > >

> > > > --

> > > > 2.16.2.windows.1

 

--_000_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_-- --_004_CY4PR11MB19280BA2AB7751CF0E51517AE1F10CY4PR11MB1928namp_ Content-Type: application/octet-stream; name="0001-IntelSiliconPkg-VTd-Add-iommu-5-level-paging-support.patch" Content-Description: 0001-IntelSiliconPkg-VTd-Add-iommu-5-level-paging-support.patch Content-Disposition: attachment; filename="0001-IntelSiliconPkg-VTd-Add-iommu-5-level-paging-support.patch"; size=34798; creation-date="Fri, 04 Dec 2020 03:42:00 GMT"; modification-date="Fri, 04 Dec 2020 03:42:00 GMT" Content-Transfer-Encoding: base64 RnJvbSA5OGRjN2FhZWZhYTY0YWVlMjUzNzA1MTA1NjU1ODI3ZDZlYzgyYjg5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTaGVuZyBXZWkgPHcuc2hlbmdAaW50ZWwuY29tPgpEYXRlOiBU aHUsIDIyIE9jdCAyMDIwIDA5OjUyOjI5ICswODAwClN1YmplY3Q6IFtQQVRDSCB2NV0gSW50ZWxT aWxpY29uUGtnL1ZUZDogQWRkIGlvbW11IDUgbGV2ZWwgcGFnaW5nIHN1cHBvcnQKClN1cHBvcnQg aW9tbXUgNSBsZXZlbCBwYWdpbmcgZm9yIHRyYW5zbGF0aW9uIHRhYmxlLgoKUkVGOiBodHRwczov L2J1Z3ppbGxhLnRpYW5vY29yZS5vcmcvc2hvd19idWcuY2dpP2lkPTMwNjcKClNpZ25lZC1vZmYt Ynk6IFNoZW5nIFdlaSA8dy5zaGVuZ0BpbnRlbC5jb20+CkNjOiBSYXkgTmkgPHJheS5uaUBpbnRl bC5jb20+CkNjOiBSYW5nYXNhaSBWIENoYWdhbnR5IDxyYW5nYXNhaS52LmNoYWdhbnR5QGludGVs LmNvbT4KQ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nRy eS4NCiAqKi8NCkBAIC0xNTcsMTYgKzE3MywyMyBAQCBDcmVhdGVTZWNvbmRMZXZlbFBhZ2luZ0Vu dHJ5VGFibGUgKAogICBJTiBWVERfU0VDT05EX0xFVkVMX1BBR0lOR19FTlRSWSAqU2Vjb25kTGV2 ZWxQYWdpbmdFbnRyeSwNCiAgIElOIFVJTlQ2NCAgICAgICAgICAgICAgICAgICAgICAgIE1lbW9y eUJhc2UsDQogICBJTiBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAgICBNZW1vcnlMaW1pdCwN Ci0gIElOIFVJTlQ2NCAgICAgICAgICAgICAgICAgICAgICAgIElvTW11QWNjZXNzDQorICBJTiBV SU5UNjQgICAgICAgICAgICAgICAgICAgICAgICBJb01tdUFjY2VzcywNCisgIElOIEJPT0xFQU4g ICAgICAgICAgICAgICAgICAgICAgIElzNUxldmVsUGFnaW5nDQogICApDQogew0KKyAgVUlOVE4g ICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4NTsNCiAgIFVJTlROICAgICAgICAgICAgICAg ICAgICAgICAgICBJbmRleDQ7DQogICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgSW5k ZXgzOw0KICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4MjsNCisgIFVJTlRO ICAgICAgICAgICAgICAgICAgICAgICAgICBMdmw1U3RhcnQ7DQorICBVSU5UTiAgICAgICAgICAg ICAgICAgICAgICAgICAgTHZsNUVuZDsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAg ICBMdmw0UGFnZXNTdGFydDsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICBMdmw0 UGFnZXNFbmQ7DQogICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgTHZsNFN0YXJ0Ow0K ICAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgIEx2bDRFbmQ7DQogICBVSU5UTiAgICAg ICAgICAgICAgICAgICAgICAgICAgTHZs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sNFB0RW50cnlbSW5kZXg0XS5CaXRzLkFkZHJlc3NMbywg THZsNFB0RW50cnlbSW5kZXg0XS5CaXRzLkFkZHJlc3NIaSk7DQorICAgICAgZm9yIChJbmRleDMg PSBMdmwzU3RhcnQ7IEluZGV4MyA8PSBMdmwzRW5kOyBJbmRleDMrKykgew0KKyAgICAgICAgaWYg KEx2bDNQdEVudHJ5W0luZGV4M10uVWludDY0ID09IDApIHsNCisgICAgICAgICAgTHZsM1B0RW50 cnlbSW5kZXgzXS5VaW50NjQgPSAoVUlOVDY0KShVSU5UTilBbGxvY2F0ZVplcm9QYWdlcyAoMSk7 DQorICAgICAgICAgIGlmIChMdmwzUHRFbnRyeVtJbmRleDNdLlVpbnQ2NCA9PSAwKSB7DQorICAg ICAgICAgICAgREVCVUcgKChERUJVR19FUlJPUiwiISEhISEhIEFMTE9DQVRFIExWTDMgUEFHRSBG QUlMICgweCV4LCAweCV4KSEhISEhIVxuIiwgSW5kZXg0LCBJbmRleDMpKTsNCisgICAgICAgICAg ICBBU1NFUlQoRkFMU0UpOw0KKyAgICAgICAgICAgIHJldHVybiBOVUxMOw0KKyAgICAgICAgICB9 DQorICAgICAgICAgIEZsdXNoUGFnZVRhYmxlTWVtb3J5IChWdGRJbmRleCwgKFVJTlROKUx2bDNQ dEVudHJ5W0luZGV4M10uVWludDY0LCBTSVpFXzRLQik7DQorICAgICAgICAgIFNldFNlY29uZExl dmVsUGFnaW5nRW50cnlBdHRyaWJ1dGUgKCZMdmwzUHRFbnRyeVtJbmRleDNdLCBFREtJSV9JT01N VV9BQ0NFU1NfUkVBRCB8IEVES0lJX0lPTU1VX0FDQ0VTU19XUklURSk7DQorICAgICAgICB9DQor DQorICAgICAgICBMdmwyUHRFbnRyeSA9IChWVERfU0VDT05EX0xFVkVMX1BBR0lOR19FTlRSWSAq KShVSU5UTilWVERfNjRCSVRTX0FERFJFU1MoTHZsM1B0RW50cnlbSW5kZXgzXS5CaXRzLkFkZHJl c3NMbywgTHZsM1B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GUgKAogLyoqDQogICBEdW1wIERNQVIgc2Vjb25k IGxldmVsIHBhZ2luZyBlbnRyeS4NCiANCi0gIEBwYXJhbVtpbl0gIFNlY29uZExldmVsUGFnaW5n RW50cnkgVGhlIHNlY29uZCBsZXZlbCBwYWdpbmcgZW50cnkuDQorICBAcGFyYW1baW5dICBTZWNv bmRMZXZlbFBhZ2luZ0VudHJ5ICBUaGUgc2Vjb25kIGxldmVsIHBhZ2luZyBlbnRyeS4NCisgIEBw YXJhbVtpbl0gIElzNUxldmVsUGFnaW5nICAgICAgICAgIElmIGl0IGlzIHRoZSA1IGxldmVsIHBh Z2luZy4NCiAqKi8NCiBWT0lEDQogRHVtcFNlY29uZExldmVsUGFnaW5nRW50cnkgKA0KLSAgSU4g Vk9JRCAqU2Vjb25kTGV2ZWxQYWdpbmdFbnRyeQ0KKyAgSU4gVk9JRCAqU2Vjb25kTGV2ZWxQYWdp bmdFbnRyeSwNCisgIElOIEJPT0xFQU4gSXM1TGV2ZWxQYWdpbmcNCiAgICkNCiB7DQorICBVSU5U TiAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg1Ow0KICAgVUlOVE4gICAgICAgICAgICAg ICAgICAgICAgICAgIEluZGV4NDsNCiAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICBJ bmRleDM7DQogICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXgyOw0KICAgVUlO VE4gICAgICAgICAgICAgICAgICAgICAgICAgIEluZGV4MTsNCisgIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgICBMdmw1SW5kZXhFbmQ7DQorICBWVERfU0VDT05EX0xFVkVMX1BBR0lOR19F TlRSWSAgKkx2bDVQdEVudHJ5Ow0KICAgVlREX1NFQ09ORF9MRVZFTF9QQUdJTkdfRU5UUlkgICpM dmw0UHRFbnRyeTsNCiAgIFZURF9TRUNPTkRfTEVWRUxfUEFHSU5HX0VOVFJZICAqTHZsM1B0RW50 cnk7DQogICBWVERfU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MCkgew0KKyAgICAgICAg REVCVUcgKChERUJVR19WRVJCT1NFLCIgIEx2bDRQdCBFbnRyeSgweCUwM3gpIC0gMHglMDE2bHhc biIsIEluZGV4NCwgTHZsNFB0RW50cnlbSW5kZXg0XS5VaW50NjQpKTsNCisgICAgICB9DQorICAg ICAgaWYgKEx2bDRQdEVudHJ5W0luZGV4NF0uVWludDY0ID09IDApIHsNCisgICAgICAgIGNvbnRp bnVlOw0KKyAgICAgIH0NCisgICAgICBMdmwzUHRFbnRyeSA9IChWVERfU0VDT05EX0xFVkVMX1BB R0lOR19FTlRSWSAqKShVSU5UTilWVERfNjRCSVRTX0FERFJFU1MoTHZsNFB0RW50cnlbSW5kZXg0 XS5CaXRzLkFkZHJlc3NMbywgTHZsNFB0RW50cnlbSW5kZXg0XS5CaXRzLkFkZHJlc3NIaSk7DQor ICAgICAgZm9yIChJbmRleDMgPSAwOyBJbmRleDMgPCBTSVpFXzRLQi9zaXplb2YoVlREX1NFQ09O RF9MRVZFTF9QQUdJTkdfRU5UUlkpOyBJbmRleDMrKykgew0KKyAgICAgICAgaWYgKEx2bDNQdEVu dHJ5W0luZGV4M10uVWludDY0ICE9IDApIHsNCisgICAgICAgICAgREVCVUcgKChERUJVR19WRVJC T1NFLCIgICBMdmwzUHQgRW50cnkoMHglMDN4KSAtIDB4JTAxNmx4XG4iLCBJbmRleDMsIEx2bDNQ dEVudHJ5W0luZGV4M10uVWludDY0KSk7DQogICAgICAgICB9DQotICAgICAgICBpZiAoTHZsMlB0 RW50cnlbSW5kZXgyXS5VaW50NjQgPT0gMCkgew0KKyAgICAgICAgaWYgKEx2bDNQdEVudHJ5W0lu ZGV4M10uVWludDY0ID09IDApIHsNCiAgICAgICAgICAgY29udGludWU7DQogICAgICAgICB9DQot ICAgICAgICBpZiAoTHZsMlB0RW50cnlbSW5kZXgyXS5CaXRzLlBhZ2VTaXplID09IDApIHsNCi0g ICAgICAgICAgTHZsMVB0RW50cnkgPSAoVlREX1NFQ09ORF9MR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mcgZW50cnkgaW4gVlRk IHRhYmxlIGZvciB0aGUgZGV2aWNlLg0KICAgQHBhcmFtW2luXSAgIEFkZHJlc3MgICAgICAgICAg ICAgICAgICBUaGUgYWRkcmVzcyB0byBiZSBjaGVja2VkLg0KKyAgQHBhcmFtW2luXSAgIElzNUxl dmVsUGFnaW5nICAgICAgICAgICBJZiBpdCBpcyB0aGUgNSBsZXZlbCBwYWdpbmcuDQogICBAcGFy YW1bb3V0XSAgUGFnZUF0dHJpYnV0ZXMgICAgICAgICAgIFRoZSBwYWdlIGF0dHJpYnV0ZSBvZiB0 aGUgcGFnZSBlbnRyeS4NCiANCiAgIEByZXR1cm4gVGhlIHBhZ2UgZW50cnkuDQpAQCAtNTE5LDYg KzYxMCw3IEBAIEdldFNlY29uZExldmVsUGFnZVRhYmxlRW50cnkgKAogICBJTiAgVUlOVE4gICAg ICAgICAgICAgICAgICAgICAgICAgVnRkSW5kZXgsDQogICBJTiAgVlREX1NFQ09ORF9MRVZFTF9Q QUdJTkdfRU5UUlkgKlNlY29uZExldmVsUGFnaW5nRW50cnksDQogICBJTiAgUEhZU0lDQUxfQURE UkVTUyAgICAgICAgICAgICAgQWRkcmVzcywNCisgIElOICBCT09MRUFOICAgICAgICAgICAgICAg ICAgICAgICBJczVMZXZlbFBhZ2luZywNCiAgIE9VVCBQQUdFX0FUVFJJQlVURSAgICAgICAgICAg ICAgICAqUGFnZUF0dHJpYnV0ZQ0KICAgKQ0KIHsNCkBAIC01MjYsMTcgKzYxOCwzOCBAQCBHZXRT ZWNvbmRMZXZlbFBhZ2VUYWJsZUVudHJ5ICgKICAgVUlOVE4gICAgICAgICAgICAgICAgIEluZGV4 MjsNCiAgIFVJTlROICAgICAgICAgICAgICAgICBJbmRleDM7DQogICBVSU5UTiAgICAgICAgICAg ICAgICAgSW5kZXg0Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgIEluZGV4NTsNCiAgIFVJTlQ2 NCAgICAgICAgICAgICAgICAqTDFQYWdlVG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