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.71286.1679574925353415942 for ; Thu, 23 Mar 2023 05:35:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Qxxz0F80; 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=1679574925; x=1711110925; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=G/TPWOwE81qy0ORY0kwaSGQZkAKcwNmAtHViPFxci7o=; b=Qxxz0F80mFfEoo6H7k6rb+X9Eb+0B48CwkVSaIonDlM7Sr2jdzqaSSWy WAGMvDvEtA+o2l1UrKyKsDgmncmFIqrrj8g3oSMkCJ0gowWy9E3WeZ/T4 ohYvnqC3SBAd618PhgyEAJ0qx36f5ZzUfADxkeoI0iG3V12awRcFNBNNX Tgjb01AlpayjtODscjB2l5vQtWniw0Y/XPz4RWlYIOzIgqlyFZz1vWYTa GSPlARC6TJXrLgj3Flb1ITo4IojVOhoCD63hPfJJ3ojNWS6g+TJuCiktj kNCItnE8aZEQ4KUBiVtO+fe6KFB+5iLbO4TDN4Jy6GXno4WYQ5F0B3+dg Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="338193890" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="338193890" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 05:35:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="825801537" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="825801537" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga001.fm.intel.com with ESMTP; 23 Mar 2023 05:35:16 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 23 Mar 2023 05:35:15 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 23 Mar 2023 05:35:15 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 23 Mar 2023 05:35:15 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 23 Mar 2023 05:35:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ipc93NB/dgvS9o+TknN4QDhtxR62QLOEkR8nFPjQXgZ1cE3y+aDCkI84SOR1oSjLlJFL36/T+1UrBCBRyGLSw4smYrWEUUVjc2dS/NJrqa6UmYZYY8QqaKdyHkTOoC7jzDYkTfsQKWJX2hPjh3bmAMK10uElGD6EmVIl16CBu+OqFjwjl0Cx9k83euY6chKqjxRu0ydG/thqoski2AJQaAt8rCfMdXcM9gP0iOcpfD+fIWWi6PtRLu0Od0TGQPHa6TyqE69ZsCVl3haGHyu8DVpb3Gqn8OFxi80sNc+oKQ4ugg8cq5hVdJzsgBJgZ1diTIxgdlPnzODfWvIr7MkJAQ== 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=JnNggJS5bv5OWOI0A5obfh6dkpa8Tj/4XK8bQh5BZL4=; b=QCApy5eNxAO6QR7BSpZZe9fhnKvKACsL9TlrLEl1JV+Z+WkNsUnaHesyYzOSZcu8OuReBLdgA2ltufPWmRYwEEmvmbEVsWL9yTlKBxe5O1Gn87ohC131ArsGn44xZyC+Ucfbo6K6i3mT4M6GHkctEWlpcov+8rb/0PLBwy0NsUeMeJdJJBZrzMn91ixBh2AmYiK4F0b/7iMrS8wn08bX1dRyox/Z2uNxFniogOq8e7sBLyxX9d0jzIBebOKPcXp4nRQPaPCZoIdlpCc+W2k2iNxLRN/iuw78d00cpsV7gE1qk19g+mSxFucXzpBIORECzaA2QUNrGhTDKtkEgXHe+w== 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 CO1PR11MB5121.namprd11.prod.outlook.com (2603:10b6:303:98::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 12:35: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; Thu, 23 Mar 2023 12:35:12 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [Patch V4 06/21] UefiCpuPkg/CpuPageTableLib: Fix issue when splitting leaf entry Thread-Topic: [Patch V4 06/21] UefiCpuPkg/CpuPageTableLib: Fix issue when splitting leaf entry Thread-Index: AQHZXVrixAjE1bwNBkiCoIlm5jI6na8ITJgQ Date: Thu, 23 Mar 2023 12:35:11 +0000 Message-ID: References: <20230323074057.549-1-dun.tan@intel.com> <20230323074057.549-7-dun.tan@intel.com> In-Reply-To: <20230323074057.549-7-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_|CO1PR11MB5121:EE_ x-ms-office365-filtering-correlation-id: 44da6746-afe2-49cb-bb89-08db2b9b0bc3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /w+6tuioDQnNJF8wwNMthfE0jfXJby4w4680KrVRW27v4cF9rbv6AKTD2cuQiry07DTjYSTxt7iy8OYB5CBPePSyIZWmyHMovS8aglsj7WCz8E3x8mw+tVSMsjI+CVoaYDFj5usK/CkGS/YYBTzVAOJZai4uhYbaXMgCfT5Maiv6ulUwUPMnabzjGnc1Fr0j6K6dTii32HzVMm6SF1w+IngFODZAgQrORi95Nq5yOp5mp68CGI6agcfIKOOT4Fjbk6ARpDtv5qnvqYQXtpi9z4ozGSCN6ni9kvwgfpHL5SAiJ+P3Nz/KEr2LFUZmxEv3MFJ4rEvw1llCFUPigbTrPJbARJNrjHnJa4PoAY39xfjmGvjmPMXs04SZobXDj/QXvJpamJwcNPeqvRyA9w0ktiDvkuT9PFGvpNpFud66aerGmenjexxI0d6lARevL676Z59inKW57UT7QZodPBdrMmaubZM3tFdPupZkLKMm5a7WGU90zCt89kdHlMR4zoav7oS0igonhkD7kWCQjLneAU0/W9W2ZKrrN2CZp3OwiRdovIxpWpEMe4COTaXL/pHlMjORVBGnnc91XIceyWD/0ULy7t9wK4rv73xAgbt8d4uXEg32DW6rXPL6Elqrr+ni+HTLp3rm2CeGso0eXr1+3dsWM4a4mAW4sRPHihrEX7W+viPBziuIO7FB1HqVvDrp1SfDxC/5/oS0PMZgv44/Vg== 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)(366004)(346002)(396003)(136003)(451199018)(55016003)(38070700005)(38100700002)(2906002)(478600001)(71200400001)(7696005)(9686003)(186003)(33656002)(86362001)(316002)(110136005)(54906003)(4744005)(66476007)(64756008)(8676002)(66556008)(66946007)(66446008)(4326008)(76116006)(52536014)(8936002)(26005)(6506007)(122000001)(5660300002)(41300700001)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?AxCPbkz4tHETotL98gmazYQU2pbis9wHgXh0F7ptrEaAjes9H+W2qnrb8OYI?= =?us-ascii?Q?q8amBwtrkDcAwO8Wxb5PwSzyfcqba7DipnO2bEuiZzy2cfAaTiZuI91b1Xvl?= =?us-ascii?Q?RGxjJmlNgwbmgg/brg/y8fwZjdG/Xp2RA+HPMeDnyaoiAMWkQWLtbZiF3p1o?= =?us-ascii?Q?mwK5Bhsiqyik7dlYn/NckaNskF//D03iGzshzVrC+1CYwaaz2R0MZLbPSjhf?= =?us-ascii?Q?KWOHBvdKCL8hA4Awk0CtbONSkPMw8Rn/hAz1NendP7eIXlnw8MUwpfwB2FLN?= =?us-ascii?Q?DOXWsyDNQB2c+/T+48i92BBckZCrVbV/D6hFMN80nbxBc7ajGf5DZNzmBMwA?= =?us-ascii?Q?/CO4mXOdn9wW+Ln9TJ0RrgZIPfNq3cHzMwOIiPvFXC1Odo4EFxi50jS1dIqk?= =?us-ascii?Q?ZG6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BFRMh6Yt5fHJyMF?= =?us-ascii?Q?/InVDQpxvJWa2E/YDMpQnlau4kgUYwetCMxfw20LwqXdfDIaiYdrgDKm35nV?= =?us-ascii?Q?viZpq6yAbH3NMMCK/56yxNMXIF7AjWHNH1qIG+WkY2ZMLqMmch+R1fB4pzvR?= =?us-ascii?Q?ETt9sbrNFUx4spgphANpuoc/f4vBTyEObf1Cd3Nz0seH+nUt5qkRm6VhwVCz?= =?us-ascii?Q?Hxek/oIAOQxckP7FIVmPr0HGyBvhIBM6l4qpNReRTRicbGNaoMxVx1S36is/?= =?us-ascii?Q?bBqZ/QzriROu7umDPLW/pzm6pVb9uXvHmz9tpQcv?= 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: 44da6746-afe2-49cb-bb89-08db2b9b0bc3 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2023 12:35:11.9890 (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: Q4Mhf8RBAN+xPJOFp3PiHJsivAz1Shp6jLKIm2yAqBgfkFksPym+O2DBUCGW+hUPl8y26UOfSAOlgvsei2ddKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5121 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 > + ParentPagingEntry->Uint64 =3D ((UINTN)(VOID *)PagingEntry) | > (ParentPagingEntry->Uint64 & (~IA32_PE_BASE_ADDRESS_MASK_40)); In this branch, ParentPagingEntry is a leaf entry covering 2M or 1G physica= l address range. Then, why not use IA32_PE_BASE_ADDRESS_MASK_39? Because for the two types l= eaf entry, address only occupies 39 bits, not 40bits.