From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.96211.1679645244144800231 for ; Fri, 24 Mar 2023 01:07:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=IgAj7ZRf; spf=pass (domain: intel.com, ip: 192.55.52.120, 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=1679645244; x=1711181244; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+gA2jvtd9F5hk5tskDccTKjY32UBMinLl0HvRCghLyU=; b=IgAj7ZRf6FauPyPOs+pAoc/FvdNXIIWmx6I/JdWE+7PfSQNl6a6XwE7N EFnq1WXVhlkSlo7/oiwVn3GcgElBzk19ZOJk2/46smxcZSHvKRadEXyVx Kv8K3z9rFcRnkFLEzKqahI6tkjIhv5oi09e0XRqMvsW4wq7kncAXseyYV gY40hVU65PCUFG11XFqMynnRlwGM454SMY/S4teo2RpjOiV+ZXEPXUanO XWomCF/h2HIpSj/qd/02k/Mhj3dP8ULkazcLOrSKO3oA/x1xQ0uDuIwBl ylPDojBfpaBRTdjjn1M+XlXCSskdj9rMKfb0457EhvXCJAUPxK7q9x8KW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="338444537" X-IronPort-AV: E=Sophos;i="5.98,287,1673942400"; d="scan'208";a="338444537" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 01:07:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="676044175" X-IronPort-AV: E=Sophos;i="5.98,287,1673942400"; d="scan'208";a="676044175" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 24 Mar 2023 01:07:15 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 24 Mar 2023 01:07:14 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 24 Mar 2023 01:07:14 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Fri, 24 Mar 2023 01:07:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DDzqXZGUR7NRLHOdPcm8osCqUpNkShPXSTOP7difrE+m8xk/zxAqBaaW7ycyV8CHF7cUxO5Y9M6rMl8Hc9u93wgmcUiJznA3i0l3Om/DsST04VF1EuLrfe44vFe9B1gqEp/Wn22j79oHy8ARFogUN3Is/PFBopQZpIozPaO6nYih5R5zOEmk+b+aNw6Lft2Lbe0epG0rF5jtfNzFkB3OZeRW5QX53tWlqs1RXXdggb414znsVOpsl+eYg2l+0lKgu8r5sUjMayvO6Qb4mOq0HzxnCop4fmDHmDqC5YT7o9QCYunM05d2r9BGbIZWOck7DtKXP/b0bqJZXoYWxoy38w== 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=cfuldofTbm6TtxqvHYyMY1vFZSJcqqLN7eJKRq8mL9Y=; b=eP/zdETPqcHArzdY+Monk8pmqvb1J2jqgFPL/DhHSQH3LxyvrXFORFB4HBb8pzG+vTgi2fRyzGNs6FnsLCokF5muB3hwkQYzwWTeaWAUZpSp4eXW/HbBg0LPVA9Q7SuD/hnhMS9orP62LH2Kw74LBkFz1icjmRugB/78Lyc8SMefnIA6YbN1QFwr8kpLN7856D6MwAYM6idPA/XbVB7YkDOFoAQQts4GP1HWdyND3YZsgRHMvaL1cNuOdo6W4czp4SOPrJaj06HFnCc/vzfAEivZ4P/O0sAGg4e1+Z3QEzqXYUVhtELWcs++vjlxvpOODce4Oh7+Gzs6pp25WvXXrw== 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 PH8PR11MB6705.namprd11.prod.outlook.com (2603:10b6:510:1c4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Fri, 24 Mar 2023 08:07:12 +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.037; Fri, 24 Mar 2023 08:07:12 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [Patch V5 11/22] UefiCpuPkg/CpuPageTableLib: Add LastMapEntry pointer Thread-Topic: [Patch V5 11/22] UefiCpuPkg/CpuPageTableLib: Add LastMapEntry pointer Thread-Index: AQHZXhYNiZ1erTJ4akq37UF4UN4yha8Jkwvg Date: Fri, 24 Mar 2023 08:07:12 +0000 Message-ID: References: <20230324060020.940-1-dun.tan@intel.com> <20230324060020.940-12-dun.tan@intel.com> In-Reply-To: <20230324060020.940-12-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_|PH8PR11MB6705:EE_ x-ms-office365-filtering-correlation-id: 95eaa7c0-c802-4603-0fd6-08db2c3ec60a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k6Z10L2uqWX2EepDVF0Yia/dopRa7kjNwC6yl0zoCqH0SlFfw0bGgOIVR+OOsvx9akshjjSFbA75svK40J9En8bHcz/CSX7aWUl6tEqPoMw9X4PgE9HIB5inbSoO7sFK2Y2Q+StX1GMBKlfrdqL03HjkvzmtSYDYPG1gO5JnES/Ai5XJMp/M7Dq6mAXhO/GZpODmmybLVQVJ8f23GsPthOaZCdb/nBk9Q+0LURC+Ro/jaC2Cjtt7/BNG9AxlYMQ9bo3YF/Ebt/Ok/O2beMLPOvlrRULj6Gof+DZoK43TvO3m1varSdZkWLlLHjaKUSZkdZNk1e6gRrOVFG+NQfZXR/ZIfZ96tOu9Dos9I9pRWTnqgZIOoEd6BN7fv9ip0vW8odeayxkp40FZ1PnPkH4TZ/NPlERxpbdXjPN7802oDTgEPbdEdcQmQb7pJO7+zKizGpLVL1MqiJhEodLwfbOQsTm9Dno0jSCTGJKKiPEdR1DgTxIBMLwOV4QttpfEt9t0Y1ux9PY/QErU3E8PiFfUsRnA7CWvScMF2fHWxg68MuC6bneJanxltBQBxTbEGAeZhzYBd+9MFE6saBHBP8EqZ255jpAxA/rIT41QZ/qY1rjhJTVCnImypt1HvRw4hRKViBpusBgRsQuxHKcqqeYINY353g5dA8Me/ZSXyZslAvdWKC157XStDI2//n3ouJZJWAzSmRCdwcnVlgCD0Ea7fQ== 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)(346002)(396003)(366004)(136003)(39860400002)(376002)(451199018)(33656002)(186003)(26005)(6506007)(53546011)(83380400001)(86362001)(38070700005)(2906002)(66946007)(66556008)(66446008)(71200400001)(76116006)(64756008)(54906003)(9686003)(8676002)(110136005)(66476007)(55016003)(4326008)(82960400001)(122000001)(478600001)(38100700002)(41300700001)(316002)(7696005)(52536014)(5660300002)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qfl0p+ISwJgZ8ICKstaE3l+/6dnkwlku3ptvHCO2MH7/yA8FEtj1kg7eEBUo?= =?us-ascii?Q?5qNOqQSgPAeRH0m4CedXzXbL7+Q/injl1b7D2V0y5MT9A6gypCDB6PdcZZTc?= =?us-ascii?Q?D9+lgGrBW6AmloKpGqlLy9yVFsWtwVyqS0JJp4w3dGBO2oZlmiOHTi/DVDsS?= =?us-ascii?Q?dDOhuCRZuDr7jXmCd2UzQagm455iZ1A0Yxbc5wI8Y1QoE1urUp+GJ8wjXtdz?= =?us-ascii?Q?0E1DBuHe3zvMYREWKNylpXFguxpqjxP536HM7Ixv9UTyBTVFmC4vpiuZlfNZ?= =?us-ascii?Q?Kke0CTUnVu172hzYsTk09PNWBAnc5r8q+2uIUfRj1+WJMPwC6Mrs7lR+919B?= =?us-ascii?Q?m24EG2/lW7kOI0lCn+TpSyW/sHpJST91hE/rDmYFKFRlf/52cPeLsSZSfp6C?= =?us-ascii?Q?TUaigF0RRYyphVBUhOl2fqLZmQsOpfuVCO41TXbQJpjoirCC/DmFZMlWAaBp?= =?us-ascii?Q?XIxcjve68ElBXXn9NIQ/GWdkEWAgRnOaAqt/5rhwVUq5KAhvo0Hu+HDRSuF7?= =?us-ascii?Q?1RrvqLyKS1y6Sw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?crwPar5Ce8fuZneKLMmyHbxi3F1o6epPWLJ90qFTGbxO6qVagh5Bc+8lRShz?= =?us-ascii?Q?ndF2p0zMaO8Z9/Qcs++8DXqSUTyAXIJzE1xh8oZM58z9HB3+WuXJOg8ZOt+b?= =?us-ascii?Q?cR5sWSndRqSNnfHA0go=3D?= 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: 95eaa7c0-c802-4603-0fd6-08db2c3ec60a X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2023 08:07:12.5043 (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: 3SECzpjZdsYWL80jkmr+0K+LhaHUeeZAuwi10aY6Bla808irBFjqkFUiCZ2i3wlLIQv/cyMOyW8zzy4AKC349g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6705 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 Reviewed-by: Ray Ni > -----Original Message----- > From: Tan, Dun > Sent: Friday, March 24, 2023 2:00 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann > Subject: [Patch V5 11/22] UefiCpuPkg/CpuPageTableLib: Add LastMapEntry > pointer >=20 > Add LastMapEntry pointer to replace MapEntrys->Maps[MapsIndex] > in SingleMapEntryTest () of RandomTest. >=20 > Signed-off-by: Dun Tan > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > --- > UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c | 18 > ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > index 52eb9daa10..612fddcee0 100644 > --- a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > +++ b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c > @@ -621,10 +621,12 @@ SingleMapEntryTest ( > UINTN Level; > UINT64 Value; > UNIT_TEST_STATUS TestStatus; > + MAP_ENTRY *LastMapEntry; >=20 > MapsIndex =3D MapEntrys->Count; >=20 > GenerateSingleRandomMapEntry (MaxAddress, MapEntrys); > + LastMapEntry =3D &MapEntrys->Maps[MapsIndex]; >=20 > PageTableBufferSize =3D 0; > Status =3D PageTableMap ( > @@ -632,10 +634,10 @@ SingleMapEntryTest ( > PagingMode, > NULL, > &PageTableBufferSize, > - MapEntrys->Maps[MapsIndex].LinearAddress, > - MapEntrys->Maps[MapsIndex].Length, > - &MapEntrys->Maps[MapsIndex].Attribute, > - &MapEntrys->Maps[MapsIndex].Mask > + LastMapEntry->LinearAddress, > + LastMapEntry->Length, > + &LastMapEntry->Attribute, > + &LastMapEntry->Mask > ); > if (PageTableBufferSize !=3D 0) { > UT_ASSERT_EQUAL (Status, RETURN_BUFFER_TOO_SMALL); > @@ -651,10 +653,10 @@ SingleMapEntryTest ( > PagingMode, > Buffer, > &PageTableBufferSize, > - MapEntrys->Maps[MapsIndex].LinearAddress, > - MapEntrys->Maps[MapsIndex].Length, > - &MapEntrys->Maps[MapsIndex].Attribute, > - &MapEntrys->Maps[MapsIndex].Mask > + LastMapEntry->LinearAddress, > + LastMapEntry->Length, > + &LastMapEntry->Attribute, > + &LastMapEntry->Mask > ); > } >=20 > -- > 2.31.1.windows.1