From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.92.45.60]) by mx.groups.io with SMTP id smtpd.web11.29850.1599185936879529443 for ; Thu, 03 Sep 2020 19:18:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=RKhGEHDD; spf=pass (domain: hotmail.com, ip: 40.92.45.60, mailfrom: vanjeff_919@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FchJxrTydhvhu6ajU9UMT6wElQQyNmkSS6E6dPY8krgUW79Uz5xWP9qVpqrjNlVbO9ZBQfTE9Ro4vlTTd69IQ5+qHzpsmXTM+LAHJhWkzsT0uOZPzw3giLh7yFO+S/f46oNghlJNfxWMpOMW3Gh3Mz3T91H4wF4Ypy3hD7E0UC2fnVXwB9rv+FobpEBQkcy6XvEOWGfRIDhVRqhs8+8WYLtgsY9FL/HXYEC74WBZdFUos9ezTuMgFzVZ3mExash8ffrfiwUZ1Ekm70aqvAwI3IOedkf79N8HVfMjWthreij8HB86PJx7DPa4hdqeHhALY042qGl+kSGpbmiHr0nSrw== 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=FgwMLoJnPug1B7O5Ew8JYOIjS+8G0yAL29nVLM3CuNM=; b=cdX1BQ5EGNQgQZeIchf1Jb2COg4fis/FpnwMLkKzJU1HGStyO6RooMeVXDc2xwYYcnvNN6C6+9j/4qWw1oFMlzpqqwvtajIx3eSenTShnsnXxL4F5msELM5Gb31xzB54zaZIzz9z2n4h2kdNzQf+DGlHxPxaRsWFmQtk8+/8Sli7wYPahCHEO3BVl/0EbkBo8zjR7LRX6+x/LzZvcAjemza4LOeWf/qr4zRCKmZ/El5aPi0nxvWkhfIHPPS3LT6R6rb6CPlY+Kyf65Afc36LXEI+3PYsuDWnSMQL9IjnKkyJIBjpzbIKUAR+0R9kxHums/DiLVtEMkwslb7lCE6YLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FgwMLoJnPug1B7O5Ew8JYOIjS+8G0yAL29nVLM3CuNM=; b=RKhGEHDD6ERznXyQD5wQbkKyO00W/8O2+beF1iyPbobLUML35oY8tEU6kaF0hyATi6jgoT/eKbCVFaGbmN6D/VZklv3dT65e5FdrP66avGnJaU8Mf5U0YDHJz2xqBL6UNRGJIjQv+R2qX1jE2CwR+W+Q1VNTHbZ9640t71QEFVuOFSSy+ULlp5kH0OA3J4RiEDFI782TTk3NEG5JKwh9MLZQcm+4Vo4K6z4DCU+BbuVrQgI3nsJN5+Jyaq2GP2BnmpusKz9+WeFRfWmWi8rMhWExIltAm3+knwVvWaubu7InmCt2Q/HpMFW9AMJBkYie0jqSFLmgTza63NeRvyLPqQ== Received: from DM5PR15CA0047.namprd15.prod.outlook.com (2603:10b6:4:4b::33) by BL0PR2101MB0977.namprd21.prod.outlook.com (2603:10b6:207:30::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.0; Fri, 4 Sep 2020 02:18:55 +0000 Received: from DM6NAM10FT033.eop-nam10.prod.protection.outlook.com (2603:10b6:4:4b:cafe::50) by DM5PR15CA0047.outlook.office365.com (2603:10b6:4:4b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15 via Frontend Transport; Fri, 4 Sep 2020 02:18:55 +0000 Received: from MWHPR19MB0030.namprd19.prod.outlook.com (2a01:111:e400:7e86::44) by DM6NAM10FT033.mail.protection.outlook.com (2a01:111:e400:7e86::148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16 via Frontend Transport; Fri, 4 Sep 2020 02:18:55 +0000 Received: from MWHPR19MB0030.namprd19.prod.outlook.com ([fe80::293e:af2:19ca:8470]) by MWHPR19MB0030.namprd19.prod.outlook.com ([fe80::293e:af2:19ca:8470%4]) with mapi id 15.20.3326.025; Fri, 4 Sep 2020 02:18:55 +0000 From: vanjeff_919@hotmail.com To: "devel@edk2.groups.io" , "eric.dong@intel.com" , "Ni, Ray" , "lersek@redhat.com" CC: "Lou, Yun" Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYyXSBVZWZpQ3B1UGtnL01wSW5pdExpYjogQWRkIGNoZWNrIGZvciBDUjMvR0RUL0lEVC4=?= Thread-Topic: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: Add check for CR3/GDT/IDT. Thread-Index: AQHWggSPsVD1Ufr/O0iBw4kxtzfAtalXRPGAgAAPdICAAF6HgIAAB16AgAADd88= Date: Fri, 4 Sep 2020 02:18:55 +0000 Message-ID: References: <20200903151147.1196-1-eric.dong@intel.com> ,<9c9d8289-4f8e-75d8-2816-750195a54842@redhat.com> , In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:F0CB0014CC26604507314ACA97546A0794726077AD70A62D2F50477AE8A51B6C;UpperCasedChecksum:526F15FDAAC4A7F7E087038222759F6F91D54B1EBCAFDA65048DAF6C63323289;SizeAsReceived:7387;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [oKi91xny1J4FkFeaycbgXP6jQdY79/Fs] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 8c1d18ce-e30c-483b-b208-08d85078dfea x-ms-traffictypediagnostic: BL0PR2101MB0977: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0F3UVrLRyOaYX0mXsH135rsOVrsyLbDZU+zmtERojq/rJuTJlnrC3J5DuC2Wl/r9bLP62JGcYeCg0K6x3y5Zk34PJKRUrZ4je6/bTz36kh27iWaGLToj2BUSyUMKyo/+UsyLmYz6CeEHxRCNQYzu01+BOqXUcVwgJbKJOcXaHqkvJSv0RSXmTknJRnvtDT4RbbrhXdITV+fftShQJclHDB6G8nRc7s2OVtMlaktkXNQAw1wjcnyIov6YmgvvT4Re x-ms-exchange-antispam-messagedata: M6TIICU31SVHYDYbhxRzrtIF+BTjf0OSVJAWE7SWV10/jtQGvjym1zC9A3Of3Pn1OGx2/U0x5P3NsDMneDqXjSXD87ju7ylD0/yaryzKlrr2EojPgJIszkimuRPEXp2HKl/KSx1qLomSVplCqVWkBw== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-0-msonline-outlook-fb0b2.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM10FT033.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 8c1d18ce-e30c-483b-b208-08d85078dfea X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2020 02:18:55.5463 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0977 X-Groupsio-MsgNum: 65029 Content-Language: zh-CN Content-Type: multipart/related; boundary="_005_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_"; type="multipart/alternative" --_005_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_ Content-Type: multipart/alternative; boundary="_000_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_" --_000_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 TGFzemxvICYgRXJpYywNCg0KSW50cm9kdWNpbmcgb25lIG5ldyBQQ0QgdG8gaGFuZGxlIHN1Y2gg cmFyZSB0ZXN0IGNhc2UgaXMgdG9vIGhlYXZ5LiBJIHRoaW5rIFdlIGNvdWxkIGRvIHZhbGlkYXRp bmcgQ1IzL0dEVC9JRFQgc3BhY2UgPCA0R0IgYWRkcmVzcyBhbHdheXMgaW4gTXBJbml0TGliLg0K DQpKZWZmDQoNCreivP7IyzogRG9uZywgRXJpYzxtYWlsdG86ZXJpYy5kb25nQGludGVsLmNvbT4N Creiy83KsbzkOiAyMDIwxOo51MI0yNUgMTA6MDENCsrVvP7IyzogTmksIFJheTxtYWlsdG86cmF5 Lm5pQGludGVsLmNvbT47IGRldmVsQGVkazIuZ3JvdXBzLmlvPG1haWx0bzpkZXZlbEBlZGsyLmdy b3Vwcy5pbz47IGxlcnNla0ByZWRoYXQuY29tPG1haWx0bzpsZXJzZWtAcmVkaGF0LmNvbT4NCrOt y806IExvdSwgWXVuPG1haWx0bzp5dW4ubG91QGludGVsLmNvbT4NCtb3zOI6IFJlOiBbZWRrMi1k ZXZlbF0gW1BBVENIIHYyXSBVZWZpQ3B1UGtnL01wSW5pdExpYjogQWRkIGNoZWNrIGZvciBDUjMv R0RUL0lEVC4NCg0KSSBndWVzcyBMYXN6bG8gdGhpbmsgdGhpcyBjaGVjayBpcyBub3QgYWx3YXlz IG5lZWRlZCwganVzdCB1c2VkIGZvciB0aGlzIHNwZWNpYWwgc2hlbGwgYXBwbGljYXRpb24gY2Fz ZS4gSGUgd2FudHMgdG8gdXNlIGRlZmF1bHQgRkFMU0UgdG8gYW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JsZUFQ KCkgbWVtYmVyIGZ1bmN0aW9ucyBvZg0KPiBFRklfTVBfU0VSVklDRVNfUFJPVE9DT0wgbWF5IG9u bHkgYmUgY2FsbGVkIG9uIHRoZSAoY3VycmVudCkgQlNQLg0KPiBCZWNhdXNlIG9mIHRoaXMsIGl0 IGlzIE9LIHRvIGNhbGwgVmFsaWRDUjNHZHRJZHRDaGVjaygpIGFzIHRoZSB2ZXJ5DQo+IGZpcnN0 IGFjdGlvbiBpbiB0aGUgYWJvdmUtbGlzdGVkIER4ZU1wTGliIGZ1bmN0aW9ucy4NCj4NCj4gKEFz c3VtaW5nIHRoZSBwcm90b2NvbCBtZW1iZXJzIGFyZSBjYWxsZWQgZnJvbSBhbiBBUCwgYW5kIGNv bnNlcXVlbnRseQ0KPiB3ZSBjaGVjayBDUjMgLyBHRFRSIC8gSURUUiBvbiB0aGUgQVAgKGFuZCBu b3Qgb24gdGhlIEJTUCksIHRoYXQncyB0aGUNCj4gKmNhbGxlcidzKiBmYXVsdCwgcGVyIHNwZWMh KQ0KDQpUaGlzIG1lYW5zIHdlIGNhbiBtb3ZlIHRoZSBWYWxpZENyM0dkdElkdENoZWNrKCkgZnVu Y3Rpb24gdG8NCiJEeGVNcExpYi5jIiwgYW5kIGl0IGlzIG5vdCBuZWNlc3NhcnkgdG8gbW9kaWZ5 ICJNcExpYi5oIi4NCg0KVGhhbmtzDQpMYXN6bG8NCg0KDQoNCg== --_000_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

Laszlo & Eric,

 

Introducing one new PCD to han= dle such rare test case is too heavy. I think We could do validating CR3/GD= T/IDT space < 4GB address always in MpInitLib.

 

Jeff

 

=B7=A2=BC=FE= =C8=CB: Dong, Eric=
=B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA9=D4=C24=C8=D5 10:01
=CA=D5=BC=FE=C8=CB: Ni, Ray; devel@edk2.groups.io; lersek@redhat.com
=B3=AD=CB=CD: Lou, Yun
=D6=F7=CC=E2: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: Add check for CR3/GDT/= IDT.

 

I guess Laszlo think this check is not always needed, just used for = this special shell application case. He wants to use default FALSE to always ignore this check and make code logic clear.

 

Thanks,

Eric

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Friday, September 4, 2020 9:34 AM
To: devel@edk2.groups.io; lersek@redhat.com; Dong, Eric <eric.do= ng@intel.com>
Cc: Lou, Yun <yun.lou@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: Add chec= k for CR3/GDT/IDT.

 =

Why do we need a = new PCD to control such check? Under what circumstance the PCD is false?

We may need to mo= ve such check out of MpLib.c. Because when bps runs at 32bit mode, AP doesn= =A1=AFt need to switch to long mode, such check is not needed and also always pas= ses.

 =

We should not ass= ume PEI runs at 32 bit mode.

 =

=B7=A2=BC=FE=C8=CB= : devel@edk2.groups.io <devel@edk2.groups.io> =B4= = =FA=B1=ED Laszlo Ersek <lersek@redhat.com>
= = =B7=A2=CB=CD=CA=B1=BC=E4:= Friday, September 4, 2020 3:55:47 AM
= = =CA=D5=BC=FE=C8=CB: Dong, Eric <eric.dong@intel.com= >; devel@edk2.groups.io <devel= @edk2.groups.io>
= = =B3=AD=CB=CD: Ni, Ray <ray.ni@intel.com><= br> = = =D6=F7=CC=E2: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MpInitLib: Add check for CR3/GDT/I= DT.

 =

On 09/03/20 21:00, Laszlo Ersek wrote:

> (10) More importantly, ValidCR3GdtIdtCheck() should not be called in = the
> Worker functions for StartupAllAPs, StartupThisAP, SwitchBSP, and
> EnableDisableAP, in "UefiCpuPkg/Library/MpInitLib/MpLib.c".=
>
> Instead, the calls should be made in the DXE instance of the library<= br> > ("UefiCpuPkg/Library/MpInitLib/DxeMpLib.c"), at the very to= p of the
> functions:
>
> - MpInitLibStartupAllAPs
> - MpInitLibStartupThisAP
> - MpInitLibSwitchBSP
> - MpInitLibEnableDisableAP
>
> Here's why:
>
> (a) The symptom does not affect the PEI phase -- by the time the UEFI=
> application is executed, the PEI phase has ended; there's no need to<= br> > modify the PEI instance of the library.
>
> (b) The currently proposed failure exits are too late. For example, i= n
> the SwitchBSPWorker() function, by the time we exit, we have called > DisableApicTimerInterrupt(), SaveAndDisableInterrupts(), and
> DisableLvtInterrupts() -- and the error path does not restore the
> original environment.
>
> (c) According to the PI spec (v1.7), the StartupAllAPs(),
> StartupThisAP(), SwitchBSP(), EnableDisableAP() member functions of > EFI_MP_SERVICES_PROTOCOL may only be called on the (current) BSP.
> Because of this, it is OK to call ValidCR3GdtIdtCheck() as the very > first action in the above-listed DxeMpLib functions.
>
> (Assuming the protocol members are called from an AP, and consequentl= y
> we check CR3 / GDTR / IDTR on the AP (and not on the BSP), that's the=
> *caller's* fault, per spec!)

This means we can move the ValidCr3GdtIdtCheck() function to
"DxeMpLib.c", and it is not necessary to modify "MpLib.h&qu= ot;.

Thanks
Laszlo

 

--_000_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_-- --_005_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_ Content-Type: image/png; name="89184FA29A184BD3AE9BDABEFEE0BA6A.png" Content-Description: 89184FA29A184BD3AE9BDABEFEE0BA6A.png Content-Disposition: inline; filename="89184FA29A184BD3AE9BDABEFEE0BA6A.png"; size=144; creation-date="Fri, 04 Sep 2020 02:18:54 GMT"; modification-date="Fri, 04 Sep 2020 02:18:54 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAArYAAAACCAYAAACtx5+mAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAlSURBVFhH7cMBDQAABAAw/UtJIIEw5GD/9gAA gBeyelRV9faeBRsQNwwY9nKzAAAAAElFTkSuQmCC --_005_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_ Content-Type: image/png; name="435BFC14D84B499EABDAF41539376076.png" Content-Description: 435BFC14D84B499EABDAF41539376076.png Content-Disposition: inline; filename="435BFC14D84B499EABDAF41539376076.png"; size=132; creation-date="Fri, 04 Sep 2020 02:18:54 GMT"; modification-date="Fri, 04 Sep 2020 02:18:54 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAsQAAAABCAYAAADZ77itAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZSURBVEhL7cEBAQAAAIIg/69uSEAAAPCrBgsR AAHZdg1RAAAAAElFTkSuQmCC --_005_MWHPR19MB0030A0F6198275E37D0594FDD72D0MWHPR19MB0030namp_--