From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.53740.1683791311025639605 for ; Thu, 11 May 2023 00:48:31 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FUzRkc2v; spf=pass (domain: intel.com, ip: 192.55.52.136, 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=1683791311; x=1715327311; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=T1vhY1VUECk80jOliCs7tpYQJAlxbjWtsaWHOBj2t2k=; b=FUzRkc2vAxpJilP3ibAwGzc8KTWHnBKFADDg8FNBoKZynHYGxNL/hYTK P8J9VW4LiCQ7raHUfgJnUk15JCmz6DiWbLF89Fab9G9K4gzMLQ6SD2/mI BNDdKv8xA6FPSU1F6RHl4kfFEgpOybiXo2ywjAm9EBu/kgIMFWClpMtFR j3xjIejCgsHGFueT8K7gOKMcZgymz3q24YH+jBmSz+PJtZnkbhW40CJGI 6Z8yT6gJ9/dR3wDXSCVwupa8Cfpy1AJVgI6Vyl7hUm42HM7OWFeAB8Exo XIy5EmuP1Vsd6p5EodqW65cveaVZuqMYv1l/Re/c6r+bMkoqtNypotyGE w==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="330050097" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="330050097" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 00:48:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="873868815" X-IronPort-AV: E=Sophos;i="5.99,266,1677571200"; d="scan'208";a="873868815" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 11 May 2023 00:48:04 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 11 May 2023 00:48:04 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 00:48:04 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 11 May 2023 00:48:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVSH3r7rvrMnVI6wZr6pbkBAQxvFMiVEiwh8EAZhODcdhzjd8z1gifoCtWlpDFxEJ7FSrnMZE+YWW2crSMCcITdvdRnpDikneTijNGUy3ESeq1RfzsC+cv4Up38/kV7gCw8rd3nrasvUM3LE35QShNsbIvu3g9UUGzgXMwQogSOtXnux39qmrubb49XMw5vMReRhjJgJaA6YVdq1kAk/hUmasl4Z4U0RFlygkiGufz0Zvux9fX1LvlqmADzZxPVqys/hOtATj9OB/twMk1XY2BGVLduJcadWOLtO1LEXQFeSCwONn4FEnvlLWZQHlql+1wkGV2m2u9Oy+oYAIUQsIw== 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=XUsWHf/uBT/c6pHXQXCP85bbeXTRnmInTZ9o/Lfnn0E=; b=lKR0Hg/QBPp2eAxL9eP+VImUL5K8ujsl62q3xZ7rH0PdenKEwejpVGaotJk05L+GSIsdYw+gZ/2Y0rBInjlCdDghWGfdKM8bjkbJM2VESn3qd3mnvxOQXK30O194vTAOx2T1+hrqvKB/zqQlxKGiNX5nyFHNLDFr6ZRpxhOmpCtL1Zu0WN7M1pLgcbzD3vID4uUEUdGj7plI2Yn7LfcgkN8x+k+GDVtysQ6O/5ME6YGDXU+u016gKN2m7TEmgpyOHz8bdPJuHi0GaZq3l1DX3k1vwboU8aM3P2H8E3KQN5oXzBuevQX/cExza7ezRA+NUt16k0590gWFkMofq7dDZA== 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 LV2PR11MB5973.namprd11.prod.outlook.com (2603:10b6:408:14e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Thu, 11 May 2023 07:47:56 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d%5]) with mapi id 15.20.6363.032; Thu, 11 May 2023 07:47:56 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" , "kraxel@redhat.com" 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: AQHZgmBA2axaambWnE2b6Jc8et0F4q9SA0SAgADK0bCAAFTEgIABZYUAgAAsccA= Date: Thu, 11 May 2023 07:47:56 +0000 Message-ID: References: <20230509102253.16632-1-jiaxin.wu@intel.com> <20230509102253.16632-2-jiaxin.wu@intel.com> In-Reply-To: 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_|LV2PR11MB5973:EE_ x-ms-office365-filtering-correlation-id: 4b2e38ed-4f5c-40fd-d167-08db51f4089a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gYtLk6z9RCd4binrXh37aeOr2dPHqhXP10lvQR8O1KTnJQrK8lz0quEgQkRIgcZwLJEOBnmd4p9cIT0dis9KXRLzbB5KsLV8+p1lzR6wgPCPclL0m+nPh86wh8ncu1fC9k37/tb0pf/ClkT45y/dMOplt7c3RZIwi4Pc1yo5rkIFG8AK1p7M7m2QGTD6lI4Q8Hs2b5+KTPjLh5OBULXltMPION89H1VhOx5Z3luAukKvUuauuuLFgYWfxBbVLaL6O9oEQNogQE8dKm0i87yRWcB9V1zpTRZqfKhEiX6f8OEtqWPFJ+gSKvjgpuJY06CI8Lyz8Vii4GkSfXKcHnPQWDoxDPgfuMh2sbneQbUd8buxJ25gD5eE7Bhpr9rpkzmfje7Gq2uxQYiwoKDz1DA14uqjIs0WjDTTdSLpOIF0iEfKxgBlAeN8sexj7LCM6A30XWmSO+8NKeVPnG87LbBI6YPYi88JWfDKkj4WgiPBIjcK4SxuNExl3qVHQ6uCjX7X17sRKOAPpBgi42bX0mQFjhsmBcpoDy7Yb/RlsOtpcABYREC2llw5SlteyfJvImuxinw5wDO5cpFe5qYIpB1QEDNHgPc8RlkEnUKIG3tDLeSLFGYDU3M3WVWyRPsoRYVQ0JLmcgZAO5u+WorHgJw7jA== 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:(13230028)(366004)(136003)(376002)(396003)(39860400002)(346002)(451199021)(83380400001)(186003)(2906002)(38070700005)(38100700002)(86362001)(33656002)(122000001)(82960400001)(55016003)(7696005)(26005)(966005)(66899021)(8676002)(316002)(8936002)(41300700001)(71200400001)(76116006)(52536014)(5660300002)(110136005)(478600001)(54906003)(66556008)(66946007)(66476007)(64756008)(4326008)(66446008)(107886003)(53546011)(9686003)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1YvtpEh3+JRoBOjfSXSW9Ml8+BfdUqg7o3xL2KIxGQZwOA9aSDL0yYqd7Gyf?= =?us-ascii?Q?0xtlTnakdLWX3NsMGSNaXNkP9dLUmuGE/tH1Iie8tAUPlsA0tY61PviiNAoU?= =?us-ascii?Q?BVUn3RPXh8I5+mh1JbpVk9bFeydKWoQQYLHh8TgsgNSyjGiDx5mnD2ECuk4B?= =?us-ascii?Q?IG+R9a9fEW92InDPnZYOnHyxlPNcgJO96JvQl+3GDV0DGH65zoFB2abnP+Y9?= =?us-ascii?Q?lClLxB/SXyqEKu4eoyBrsbO2PDHSW5ocmGjYknsEENHSCwID4zHUIFJwhqD3?= =?us-ascii?Q?d39iwdGLB1uH76XRKUGfMI/fA/qmUqPMCLFq4KTTfiVh4YcOjbs6D1T90c8Q?= =?us-ascii?Q?7fGac0wnwFoXqp30uiS8N1U/6ouTaDeLLRgHekTrNFB9Gi9tpzsITDRLYRuv?= =?us-ascii?Q?8OB36ARe7I4PFNmFhneCGamblS8bmEGbMk937WMtdMR8iyzgSBka92TJgBdW?= =?us-ascii?Q?VQW1HZNmcaNeq4TMIeV18pDeSFiPTVA3gH6Evee3jTevhPtMzZyEdQ62fwLx?= =?us-ascii?Q?JVNNA1651dO0J6/+Dt5TSc58AFRrZcpJmdArphbt1HxF5ON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0uYHUVzshCi+HxqrR2n4eeh6UqWrTvwLdD5hVMVrbyYmO/BUYw5mNZj?= =?us-ascii?Q?EfQ8O7zxlUfUULbzLyVF9Zddl+xOBArFhbF26jliUIVdk4Ud66QQr5pd0+ZB?= =?us-ascii?Q?1Im7r2jVsFwFqkm42u0=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: 4b2e38ed-4f5c-40fd-d167-08db51f4089a X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2023 07:47:56.0716 (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: IuEoD9N6bUkqlZTw6jU5Z4WlshGaHlS8iM+iMYkC5lv4oYGNckhum5Yt36Q40tsnOhEaXIGHSY1AprXdw6zFKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB5973 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 Jiaxin, Let's keep using 48 or 57. We can use separate patch to clean all existing code to use 47 and 56. Thanks, Ray > -----Original Message----- > From: Wu, Jiaxin > Sent: Thursday, May 11, 2023 1:08 PM > 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 >=20 > What's your comments to the existing code logic for the PhysicalAddressBi= ts in > the CreateIdentityMappingPageTables()? Looks all doesn't consider the si= gn- > extended case? is it reasonable create the paging but not used? All syste= m with > long mode are sign-extended? >=20 > // > // IA-32e paging translates 48-bit linear addresses to 52-bit physical = addresses > // 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; > } >=20 >=20 > > -----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 ; > Zeng, > > Star ; Kumar, Rahul R > > Subject: Re: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate pa= ge > > table to permanent memory > > > > On Wed, May 10, 2023 at 02:48:52AM +0000, Ni, Ray wrote: > > > Gerd, > > > My understanding is that when code dereferences memory address, the c= ode > > itself is responsible for > > > supplying the sign-extended linear address. > > > The page table creation logic still maps the entire linear memory spa= ce > > supported by the CPU. > > > > > > Why do you think covering the half of the space is better? > > > > edk2 boot services operate on the assumption that everything is identit= y > > mapped, only runtime services know the concept of virtual addresses. > > > > 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 i= t's > > better for efi boot services to restrict themself to the lower half. > > > > take care, > > Gerd > > > > > > > >=20 > >