From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.1843.1678861628223017359 for ; Tue, 14 Mar 2023 23:27:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=nYXV8mUo; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678861628; x=1710397628; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ZTYG1kIM9fpo3Fwey+WwgbfBEtDK6VG3jNniJpMaSW0=; b=nYXV8mUoEWbjXMC4PBvlZ1aQFvhttyCyTT74ZDXwqL3H/OjQzhIST+2S b5yNLDexENZAZ+FgEehzMy1562KJLRNJQQUMjUcVe2VUsgs9O89C63/pS 5dV8jObCf9TO1eplT6clenZu4B9sGna1aS5nGQcbHJxwLZOQju6hkrcpE JItVhYByjkrAdSzpZZkuLoLYV6BmqnMSClbbsrsQlCDcJurAfq9yOdmeR alK04CAyDZwDJLOz5wltKiCSHnwDb2gndR1OD7T4gGYKUPiJVpvN8gIqN nx+PT8oFUg3RfvOczu8wcE5vPDJ+nNuZ/SVAAzRA/0rw6XUvksG94/LaD w==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="339987661" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="339987661" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 23:27:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="743575902" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="743575902" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 14 Mar 2023 23:27:07 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 14 Mar 2023 23:27:07 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 14 Mar 2023 23:27:06 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2507.21 via Frontend Transport; Tue, 14 Mar 2023 23:27:06 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Tue, 14 Mar 2023 23:27:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UzOK0udCUygaM+OBQWA5yj17+TTCRhSakF/vmDRo3sATUp8g/v/JgPsw4NSGeLSYR35qhddqO/BdBP5NVOXVxqO2fc8C+BqurQPK6Yq1doX06d1sUyBYgJ8+v8AFz5UsD54uz0xH4DE8xaGH6yxfWsxyY4igDL21IXMLBQA+GwqdrLQkNO4do9g+Cn7C8/+bIdH7LG9Ko8KtXX3DnumEt63mRUoCXBWGQFu9DQPKVvE4EAeKXWMSfxoIwP40QR+mlIPy4VZNglngHzdplkXhWacWkefZDd3R3Vgc4jvfW89Fa7OLf819x8sCplB7uWgdF/sQJ0s0FyX06Yu3yOR7wA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DEB+z4/dimty/PMm00TPych0Kc+7Wo9Qlm2YwnpZjBo=; b=cnhyGM5rh1oNv/JtGxx/VDl+qTGf0+pX/WlfjmEv0e6SyiFtHQ5XWJUMRjBVmtELmgTIFvQ/jXS5WlmYb0sDENjpHltaD3A5I/Y3gzBQlF0hBPRfXN2sqkvwhsfFKl80I1ntHzKnRsW1x/GAAvnK7/zb/ertvsZ1wh8xTSyNMxyCAjjSaLP8zFg21aj4T/eCfcs9sIEPpjAMKEdQpJo63Jhldy4KYX5eqTBGZUlg8n1nxvSQNidDNRSsR9oLRy4iVnqFEsZCdYtWRtDpRat6Y9Zbq3ewwUuwHxvsWgHy+J2rKpgo8DDMLO6hPODsZYleAE/qCxDRoCBWzKpaNQmjCA== 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 Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by PH7PR11MB7121.namprd11.prod.outlook.com (2603:10b6:510:20c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.29; Wed, 15 Mar 2023 06:27:04 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6178.024; Wed, 15 Mar 2023 06:27:04 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [Patch V2 12/14] UefiCpuPkg/CpuPageTableLib: Add RandomTest for PAE paging Thread-Topic: [Patch V2 12/14] UefiCpuPkg/CpuPageTableLib: Add RandomTest for PAE paging Thread-Index: AQHZUaYV2TydHfjblUOIydg73VWVOq77avmg Date: Wed, 15 Mar 2023 06:27:04 +0000 Message-ID: References: <20230308100758.669-1-dun.tan@intel.com> <20230308100758.669-13-dun.tan@intel.com> In-Reply-To: <20230308100758.669-13-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|PH7PR11MB7121:EE_ x-ms-office365-filtering-correlation-id: 4bcf8d33-510d-497c-a93d-08db251e4b2b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fPlvPYprGLy+bOsW1fnX9iFsQoopPfTZV8C8MTNA2d3dsxCai9FMRE0wCR+Rw0AoKzdyCfKAjAL6ZeCfvVU84u2h2Bk3A1/k5ayeKIHxTMivE4+O/R1naVA7GKGpu+/1Z0dqE28Up+Mj9iuY5+YDs25r5kXLRY8k4H5+bguNMVvMoQYzU8B+NUNAJ/9D8qEXcDgBDDLrNEGygYTkn1Ty0o7J4ob7I9WJupzfhZBnoP+FZ7KUEq1f//1dAFynlEKX0huVRVYQBGjdKNovmwPnsl0/kxmctOt/bdMLjmraD1qXG2kxgDJ4kQLQnP+0NK1fAJs3mlNfOoZH8u8tzKOGRv+Gsgudy4rH5j+LBx44GgGsjrp/JxRKuV4yjqBDQKc08gEmcogl/He8MsWGCGA+B2Q9yaNgn86ESJuVQnzIGM35B6GtH4XbtS9kPCIc2XfWsIFlN51sWIZyFyS5JEy68ktC6GHz23kPuOy2iIRbFbHMFGDdWa5qwqYmzne/QWWRfU3d1neJDPhJF8ZR0j1ObB8MMUE9m6shVwxV8XHC3HCdZx3pFhftKBA3n1GVqcWlHu3XoBjs31C1W6Pl5vC9sWeWIBiA+FfdkqEyOCmiFVqYJ+LNVfna42qSceb+yCAsLeQaAUk2KUsKDXUo4WWe22+dMWlMmpRP4Mg4gg3GmtosiA3/UDCBDE5k1GFFU3TP x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(376002)(39860400002)(136003)(346002)(366004)(396003)(451199018)(8936002)(5660300002)(41300700001)(4326008)(8676002)(52536014)(55016003)(33656002)(86362001)(38070700005)(122000001)(38100700002)(82960400001)(2906002)(26005)(53546011)(9686003)(6506007)(186003)(478600001)(83380400001)(71200400001)(7696005)(64756008)(66476007)(66446008)(66556008)(19627235002)(76116006)(66946007)(54906003)(316002)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cPlMTrfd8+TyAr2T8VRIhpDvrVWYQXjaZ6EUao4SanehpPyQ3x/1qZwqf2hN?= =?us-ascii?Q?J5+FAz7F30NvwggTKa073tNwhCdxD4XSTlTTbRaWfMkTzabwCQGkZcrCayx2?= =?us-ascii?Q?BLBukXku8wGMX0I7+k9gTtOZ+TxkN+4yvGeJ4F4SkmrHA02S9wlw9ryZL2Q6?= =?us-ascii?Q?UdqbIMRmwxwVsBLgxRGgR4Xcu2LlIq5++lNhqVHRZd6vjk0n/w7qH1ZuvKhq?= =?us-ascii?Q?wk2IrRLpkd5wCRGu2Z+XMcKZHfwHzcoaPKzVioaK/kajPsloG8GWaJ4YOqz+?= =?us-ascii?Q?d79+PgwuWZVtJmlg92uLTkN8o1GGFOfAfKnLuIUAXP5jHcQe50OYfjiGAF13?= =?us-ascii?Q?+fNf54+8Xr5dWsJgvGvULE8uTQSwasYHF0f0dzDn9HvEIAI1eD5mjjW1Gk95?= =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bh824coLIk/cRskrwDYjB?= =?us-ascii?Q?fLk80kiDSB/4NWDBRNjdTcz9Mk7K9ewQV3h+Pxc5uRP4/A3AKmeVxnOkQyl6?= =?us-ascii?Q?CGPo4GwQi4viotQxK1C0qjbAi1U2QYs7OPBa4Nid+8UHu2XyCjlGjpvHEFtg?= =?us-ascii?Q?/69+NuJI8y9TGxADGPDexN+oeCHuW+DxpRN6jtcerL1mpXfIMcKoPH5p0/E9?= =?us-ascii?Q?3167EY+0FezxtVKad0tpinEiA4CG7CTQve0C3tCb6SCtA7Dx75VgqqmfI1xb?= =?us-ascii?Q?9XK+eI1pbVbbiw9Ttzi9Ld6wqskeDC5/ZFSo2HsN?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4bcf8d33-510d-497c-a93d-08db251e4b2b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2023 06:27:04.3143 (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: dpxgEXmYjmEX63r8NznwhpV2ArHLRMhErdVN5KJIb2c9dMzaS2qXgqfIfpkjyq2+OffE3a6UYsSfXlpOoAVL1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7121 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Can you please check that the reserved fields in 4 PDPTE entries are set to= 0 in the test? > -----Original Message----- > From: Tan, Dun > Sent: Wednesday, March 8, 2023 6:08 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V2 12/14] UefiCpuPkg/CpuPageTableLib: Add RandomTest > for PAE paging >=20 > Add RandomTest for PAE paging. >=20 > Signed-off-by: Dun Tan > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > --- >=20 > UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTestHo > st.c | 2 ++ > UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c = | 3 +- > - > UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c = | 5 ++- > -- > 3 files changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git > a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTest > Host.c > b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTest > Host.c > index 3df6436af3..06a8fd3c02 100644 > --- > a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTest > Host.c > +++ > b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTest > Host.c > @@ -9,6 +9,7 @@ > #include "CpuPageTableLibUnitTest.h" >=20 > // ---------------------------------------------------------------------= -- PageMode-- > TestCount-TestRangeCount---RandomOptions > +static CPU_PAGE_TABLE_LIB_RANDOM_TEST_CONTEXT > mTestContextPagingPae =3D { PagingPae, 100, 20, USE_RANDOM_ARRAY }; > static CPU_PAGE_TABLE_LIB_RANDOM_TEST_CONTEXT > mTestContextPaging4Level =3D { Paging4Level, 100, 20, > USE_RANDOM_ARRAY }; > static CPU_PAGE_TABLE_LIB_RANDOM_TEST_CONTEXT > mTestContextPaging4Level1GB =3D { Paging4Level1GB, 100, 20, > USE_RANDOM_ARRAY }; > static CPU_PAGE_TABLE_LIB_RANDOM_TEST_CONTEXT > mTestContextPaging5Level =3D { Paging5Level, 100, 20, > USE_RANDOM_ARRAY }; > @@ -865,6 +866,7 @@ UefiTestMain ( > goto EXIT; > } >=20 > + AddTestCase (RandomTestCase, "Random Test for PagingPae", "Random > Test Case1", TestCaseforRandomTest, NULL, NULL, > &mTestContextPagingPae); > AddTestCase (RandomTestCase, "Random Test for Paging4Level", "Random > Test Case1", TestCaseforRandomTest, NULL, NULL, > &mTestContextPaging4Level); > AddTestCase (RandomTestCase, "Random Test for Paging4Level1G", > "Random Test Case2", TestCaseforRandomTest, NULL, NULL, > &mTestContextPaging4Level1GB); > AddTestCase (RandomTestCase, "Random Test for Paging5Level", "Random > Test Case3", TestCaseforRandomTest, NULL, NULL, > &mTestContextPaging5Level); > diff --git a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > index 8f8f0a5a9f..a7f45fb175 100644 > --- a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > +++ b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > @@ -251,10 +251,9 @@ ValidateAndRandomeModifyPageTable ( > UNIT_TEST_STATUS Status; > IA32_PAGING_ENTRY *PagingEntry; >=20 > - if ((PagingMode =3D=3D Paging32bit) || (PagingMode =3D=3D PagingPae) |= | > (PagingMode >=3D PagingModeMax)) { > + if ((PagingMode =3D=3D Paging32bit) || (PagingMode >=3D PagingModeMax)= ) { > // > // 32bit paging is never supported. > - // PAE paging will be supported later. > // > return UNIT_TEST_ERROR_TEST_FAILED; > } > diff --git a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c > b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c > index 11f7e607ca..614bd6bbf1 100644 > --- a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c > +++ b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c > @@ -175,10 +175,9 @@ IsPageTableValid ( > return UNIT_TEST_PASSED; > } >=20 > - if ((PagingMode =3D=3D Paging32bit) || (PagingMode =3D=3D PagingPae) |= | > (PagingMode >=3D PagingModeMax)) { > + if ((PagingMode =3D=3D Paging32bit) || (PagingMode >=3D PagingModeMax)= ) { > // > // 32bit paging is never supported. > - // PAE paging will be supported later. > // > return UNIT_TEST_ERROR_TEST_FAILED; > } > @@ -264,7 +263,7 @@ GetEntryFromPageTable ( > UINT64 Index; > IA32_PAGING_ENTRY *PagingEntry; >=20 > - if ((PagingMode =3D=3D Paging32bit) || (PagingMode =3D=3D PagingPae) |= | > (PagingMode >=3D PagingModeMax)) { > + if ((PagingMode =3D=3D Paging32bit) || (PagingMode >=3D PagingModeMax)= ) { > // > // 32bit paging is never supported. > // PAE paging will be supported later. > -- > 2.31.1.windows.1