From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.51690.1683781688621036003 for ; Wed, 10 May 2023 22:08:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Nioe3qwC; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: jiaxin.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683781688; x=1715317688; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mOaIIp3YhyfsTwHO9W4a4QRKvO5nMYS7JAQV8dtzo30=; b=Nioe3qwC1RFDYSWChq12LYzGfBT3zrR7oqfGUcQEM96vsjkpJtafYHpU ij329+ORAuvDxf2cWjYLbP16fyob6lHmobKqZLP2OeW5OnRCAwkiM+r63 DejQkKNjKZ8woD0AVqGVTiY9WTAFqvRhQZ0VyoNhLp4ZnIBa2XF++Aavg bbmbc5J4zLjFpf4zQunMAFNE2nBtSWDXPmzgWK89wMotzicHCe/ksIPjC vTOF/45ffV6WJRP/LBbhxuu/5tGjtZblQPisOLxy9k8TnA4IRyoxkyFVL vvE7gy7sbmdwSaLfo3TAiWjbjQ83Frt+EbcxdH7LHZwflXuNIGBgLobv9 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="378514139" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="378514139" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2023 22:08:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="702584671" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="702584671" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 10 May 2023 22:08:08 -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.23; Wed, 10 May 2023 22:08:07 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.23; Wed, 10 May 2023 22:08:07 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.23 via Frontend Transport; Wed, 10 May 2023 22:08:07 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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.23; Wed, 10 May 2023 22:08:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gzmurN722WAX1U0FA0pcN6+AaJHjLdNTIih3ddEOPVBB2eH0LA5/V6rKpmwYNTPpeSzpCMWNnwHRwfiI1w+V68u2NnTFJnkRJfHhF5nhKXBSW2mTx/eIuxpPg908Yc8wo122XuWpovVtaK7tKR2nShhaktEKZl30Y3XqqBXKmMVtfX7XtECAKMWo8dhet8M80ed5G4ycyJzPL3sLMgEiYCD1Z9JzkxFIheDXlJigRACv8wcjR+ooKR5kjoUFZB9wREZV4j5KQ3MEsfv83jpPMzzGA0tXKoj5pVch/TefC95DMiJA2z+KP9xII5fiJeZ+GJVd3XF8/CKU559yw/SW5w== 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=laSeWy5L60KX4XM14LSFCaEHWZRTdG3G99oH0PUbN2Q=; b=AALOdG6O4IRl00XvpxFMaVOm+ublD96mjNEIlG4cXLmVhVrfFZij6hrDjh7vO173+Jc7INMFPLPrqDspbnTHXjhUtsszaxOdoQjL7WhW/rw8b1glG8s2Vhq7plBnBvkn3IEQevjzpUbTQelvj/sJ7rWfCeQNvpxoQ3SSKC2zkhylNABRW/gRk7l/B+ALjHT5Oxg3X7Hn8/Qq8p+3kx6tynClnQEC36gkY7Eu/MpUHBkiezDl5Q+MfmLCPFerQDPXW9fzoctZq9YUPpjWoqhIcWZrxXc0XbQ49IsnnUfPFGAa3Kz7O0KVDHnSDypqYL6MkJxf9c1hLLMVpLDresnZwA== 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 MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by DM4PR11MB5406.namprd11.prod.outlook.com (2603:10b6:5:395::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20; Thu, 11 May 2023 05:08:05 +0000 Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::647e:54e0:2be7:9d02]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::647e:54e0:2be7:9d02%2]) with mapi id 15.20.6363.032; Thu, 11 May 2023 05:08:03 +0000 From: "Wu, Jiaxin" To: "devel@edk2.groups.io" , "kraxel@redhat.com" , "Ni, Ray" CC: "Dong, Eric" , "Zeng, Star" , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page table to permanent memory Thread-Topic: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page table to permanent memory Thread-Index: AQHZgoQC1tNfKP+2t0yoEfi+2ogET69SzuAAgABTsYCAAWRqoA== Date: Thu, 11 May 2023 05:08:02 +0000 Message-ID: References: <20230509102253.16632-1-jiaxin.wu@intel.com> <20230509102253.16632-2-jiaxin.wu@intel.com> In-Reply-To: Accept-Language: zh-CN, 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: MN0PR11MB6158:EE_|DM4PR11MB5406:EE_ x-ms-office365-filtering-correlation-id: 73fa8e94-5531-4fd5-5fe7-08db51ddb252 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hJGfiUF89K9VomjD6KcAtm2+qxR9ispGYyRf8qhGlStRYESFjFQHl3nxYU7z4jCvzJLDODaVJMrXFdwvMBFuWJj9x7NR0uZmLlbQGX2IbOaEkRGH/VyNu0mUAhdbeAWLskqLOVtyZ4+/mRm+8nXgq0whgsdvBNcsuiexy7v+/AuO5XyfZmfJayvVP5tgoK0Z7ogQsDZUGzuCTVZXe9o9qMVxxbXUG2tOAewHTiFUZh43ryXedA5ZhL7maFd0Pm3p9TghVX5G2ARPs+QNZybGM3wKCe2LgLkeEPoxzgpXZK2MGTFkwRny4SFUSaQeYn68jJRd+FF+4Th0t/vo3RayWsoQi3bkRQcuDS+jlU6VJLPvVwSVlBOa2/xNj0CV2a0kVGeHouD61QrWWiHeYfpz1QGatILYO/wHX5oHBH3JtWc3jT5qbCa7g/QZCrHsmDTnYo5J3Kch6u7ingRPH8Rv1rjTSTXpzjCYa3+/EyKeJqr9nTf7h8PuTRPw9pw53b0w5Ffg7YzVm7yPhPfW00+A9Iq8WpmWIDCZSy957vXnnElAuOcoEgMRb7KOlb+TXj7vjvSQHZ3oiDjYus+vnLKiSRNPbDs87O4b9y2xQBsS4xW2LN9DQx/94Js7uFvaX5v0c1KnkOhtNOzCxaJVYUed1A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR11MB6158.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(396003)(366004)(376002)(136003)(346002)(451199021)(966005)(33656002)(54906003)(7696005)(26005)(71200400001)(9686003)(6506007)(8936002)(186003)(38070700005)(53546011)(8676002)(478600001)(107886003)(110136005)(2906002)(82960400001)(5660300002)(38100700002)(4326008)(6636002)(316002)(83380400001)(41300700001)(122000001)(64756008)(66446008)(66946007)(76116006)(66476007)(66556008)(52536014)(86362001)(55016003)(66899021);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vKnv7juhyw5SHkm2aU2JfbL8PHUz0EZ5KQbkNwD8NW25K0gUMr7SZFY72W07?= =?us-ascii?Q?im5MeV5Yr17ztsmVf/BBTS7o0SZ/aLt0s1GMLJvKxoqwdGug0rFuI19fJgD/?= =?us-ascii?Q?vjdvJvEilp/O7XeZXeOzWXC4J8C7WXfRCdXt3m9Tr2F3Nmtv7qTBhExTLB3f?= =?us-ascii?Q?mNnd5n6YUlDWSzR4fviiNo5wkPGKuWg9sCLhVuVammoXojuwanvkdS25thBV?= =?us-ascii?Q?tBNEDGni+FE3wBdOgSsUtAO/LmdY7KdG5VOSFbDhNmtsoJdyj7To3EWEd3lt?= =?us-ascii?Q?wpmA7bDhUZhsiOjhLrVdx5uYOgqkZr+3jdSJfYBNrE4rCEbULV0RNlIsKHMk?= =?us-ascii?Q?exsaCBKq73wdumJMp2pIbt4FlDuHy8rALUYjhZuB0/uYEmTNIHKHaAkLi10o?= =?us-ascii?Q?UP7aF3DFr9aXge5Fjq2lIYsyFY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WE6v013g?= =?us-ascii?Q?5K5jxrCmc1PJX7TEVI4Ta+PRhHx9mlBBFD6rbBA9FY6rVEQjApMsSv7758Le?= =?us-ascii?Q?g28ssdIdj/nW5akBwT6i+uDuhlxbYgcLR2ZM+X/Qu3gMr5La5OawV9vwEZM6?= =?us-ascii?Q?ggZ7HW5rq7DPrB6HTDdmzpicHYJXDCKi1P6OaPhQeEjlQVZHqb9+omR0ioBS?= =?us-ascii?Q?GMJXZka1fIO5nv7lZk9okVQTJ7RwvFgQSXayk/BUITzZUJr9x6zntyWXgT9w?= =?us-ascii?Q?AqroVAFgJKJ+ebUVvPEAREuPWz3F5OaPzkQcimCI?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73fa8e94-5531-4fd5-5fe7-08db51ddb252 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2023 05:08:02.4292 (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: HFUDIQFX/iom71rj4X5b65imde5CWXQMbC7s0NCHIu5gOEgtZUt8WM2fDXgiQWGXr04uOXn8PKQyW3woCWjw/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5406 Return-Path: jiaxin.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable What's your comments to the existing code logic for the PhysicalAddressBits= in the CreateIdentityMappingPageTables()? Looks all doesn't consider the = sign-extended case? is it reasonable create the paging but not used? All sy= stem with long mode are sign-extended? // // IA-32e paging translates 48-bit linear addresses to 52-bit physical ad= dresses // when 5-Level Paging is disabled, // due to either unsupported by HW, or disabled by PCD. // ASSERT (PhysicalAddressBits <=3D 52); if (!Page5LevelSupport && (PhysicalAddressBits > 48)) { PhysicalAddressBits =3D 48; } > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Wednesday, May 10, 2023 3:48 PM > To: devel@edk2.groups.io; Ni, Ray > Cc: Wu, Jiaxin ; Dong, Eric ; Z= eng, > Star ; Kumar, Rahul R > Subject: Re: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page > table to permanent memory >=20 > On Wed, May 10, 2023 at 02:48:52AM +0000, Ni, Ray wrote: > > Gerd, > > My understanding is that when code dereferences memory address, the cod= e > itself is responsible for > > supplying the sign-extended linear address. > > The page table creation logic still maps the entire linear memory space > supported by the CPU. > > > > Why do you think covering the half of the space is better? >=20 > edk2 boot services operate on the assumption that everything is identity > mapped, only runtime services know the concept of virtual addresses. >=20 > The lower half of the address space can be identity-mapped (virtual > address =3D=3D physical address). The upper half can not, so I think it'= s > better for efi boot services to restrict themself to the lower half. >=20 > take care, > Gerd >=20 >=20 >=20 >=20 >=20