From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.14837.1683857986187618490 for ; Thu, 11 May 2023 19:19:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Ac4aVsJD; spf=pass (domain: intel.com, ip: 192.55.52.93, 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=1683857986; x=1715393986; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bgdq8bdetOsjlyYkFyZ/IjlBI6mNZByJFeypO3Q1DWw=; b=Ac4aVsJDLi+3bqSGo1hg6L6Js1Z6RWwECIpnEArDQdQzcKWII+gkD8m4 7IVYFyXC/DSrUgOMY1BWuC4BzQ/MwgLO8txxXsDAvkHPoBpj4SwS02euA 6euoOmX/pU6StqFbDCkAAMTQ5uxa4l0GjhV5uMCDPsSO7tRR7E6MOhhEt E+WzNjxitqBvccqY4CUAp/eUZ8weEFiSxlzmAOhpgkpM6TKGgzXL9fq5i iYi9F2ay1g5L8pwNPzCZrvRGzV+PidOJvMleJNm4mgF50X0gro4KCx83T f9yNPF2lNi9IsB034Jh7LxtGe3PVP+uRLMAKgrOhSgl/M2hA2O3SjLUZm g==; X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="348178322" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="348178322" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2023 19:19:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10707"; a="789628600" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="789628600" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2023 19:19:45 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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 19:19:45 -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.23 via Frontend Transport; Thu, 11 May 2023 19:19:45 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) 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; Thu, 11 May 2023 19:19:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kylg+YKk+MMWwyeACq4Saqqcjoxe35S9LXpuoE13BpoLWnOwTgts+bnkqurNn10UWSxfD14V7RLLove2k0NwDu2TurjFaazldYGwvLaCQBsoBF3Zg7keYRz2TiHErPDCmlH5cMnL7/Pc/NqOG090CWbAAgh02PswFA90UkkZ20wif9GbrCS8xV0/ex4NBVcTQWRXqOrlTLt9LmhL82gHD5qk/kNBWWX9HQGyO71s+HUIs0ROSTf/hPSOd9nhlkSVMF7mcjhsooWDsYY83TEBh0at31HSsN5F1DLg+LO9QTKMZb+ze6Wmi4k5fqQ8p2iOwGhPhtsxx2VyaaT26aNjQQ== 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=s6MalTAAlGcy5G3fJu4QIsdTHmgVbgjUCASj7QMK3nY=; b=KJmNly8isDlgiZZ01wQYeUNjQIrf3uclH2L0LInexqQr2/IbsvJsDPZ4aXez5H8YSK6mgatE1FoVNtBc1ywxCJ3EMvsDRNDh+khGrZdAr91vsdoarbhuZ7CTayyeduk/k+iYtEbsO9LH0dwTAnFHcECRBwHfWNbzI5tX/Qu1a+w1xFLlKlFl8tJ7mBir5fNctG3XuFbX4v6Yx1xzhO4avLTyLu4MYx8XyCaXqkfWqn1Wq8gyKakdi0aJ3vWccvb+Pl/NIiq4cf6fRwIClS/sVcosWY0ZrltlrFgvJ4swMKRfQy5BYHyk8UwtSRmm4L0qj4ock15Sjvamlt4r+ITNNA== 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 IA1PR11MB6122.namprd11.prod.outlook.com (2603:10b6:208:3ee::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.21; Fri, 12 May 2023 02:19:41 +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.037; Fri, 12 May 2023 02:19:41 +0000 From: "Wu, Jiaxin" To: "Ni, Ray" , "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: AQHZgoQC1tNfKP+2t0yoEfi+2ogET69SzuAAgABTsYCAAWRqoIAALckAgAE2gMA= Date: Fri, 12 May 2023 02:19:41 +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_|IA1PR11MB6122:EE_ x-ms-office365-filtering-correlation-id: 2b3aceff-767a-407e-c8a5-08db528f5839 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: REOQ0zIoJFjm6Huzavem/dtAaRz8JVPq0PAXRuuql7IKTucvNDrTEKpgLlFFYiWAHY21TA7jxfYXobeJVcpbPmX6g6bIt7NML32758LyyzJt0XQO5xv9gcpc36HBm+L2w2Y8KLsEWPXPfj2YI0iOQFqNiWyasxRNQIPibyV0c3ji8KyudlzAjpE86JS9HKmeQZZeBzk3ZmkG7KXmoTDamoEpLxTMeV8Qew+7FWbsaM3muA9TywQHf8ihtdrb1X0DkDJTYnXdHkpI62xntKhR+77N6hbIohgcBfZiPdTNgmK9gpJl1bunEQwam77uCq5dGjNM7vKlUkj1h3W5LZluELNHeNU5+zME5MWImZd+tZ40ZuhNwE5+2mgeblJZTImK72hBcLUddUnMt4NrtLS4tiopOGls/XbIRnN+nLwdXVg93C26o/EWmR9hnK5/nw94w6Q+MfppL6NnSgJWCq0Rhrbwtc+BpRWO40eQMSDqUKI/KVr836ck44vKc3nVgBnje9ruubcd65QYRTobIHjmlZeoGaj/mUoJYrYHqQzbXoFOQJ8gaoEMNxh9FvG9JNH6wagyRcje2LDEWYJMjbM0/3uYxFimIwpwP+nfiNwavRbkPzj/t+ex0O3jl40S7b1pr6PSolrDyg2nXPL5B52NVg== 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)(136003)(376002)(366004)(39860400002)(396003)(346002)(451199021)(66899021)(966005)(64756008)(66556008)(66476007)(66446008)(76116006)(478600001)(7696005)(66946007)(316002)(4326008)(54906003)(110136005)(33656002)(86362001)(83380400001)(6506007)(26005)(9686003)(186003)(107886003)(53546011)(52536014)(82960400001)(5660300002)(71200400001)(8936002)(8676002)(2906002)(41300700001)(55016003)(38070700005)(38100700002)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mapfZ48LUbiia5w2naLTV25lkXMsSZx7E5LFDH2cgeztN8ozFgljKtCW+OPl?= =?us-ascii?Q?dwN+wCRMgm7zo9MeetK3XGvz8JaVNZ0ReQiM00S7Yqm5/F58HkjkOCz5vUeV?= =?us-ascii?Q?MV5MdJInLVEk83EdpNDqE+uECmBFSBIFf1uuJKu5JgH1FAUwTIUmUD3kezhb?= =?us-ascii?Q?y3fJgE3B/EBEEcIqooNi8glrcfeHJrk2iVMwWa8/cuwROMpmtdmATkUak0B4?= =?us-ascii?Q?3mXZcfJhwVwjRCU//t43JtuSaxksKhInMwurx7vayrhkLmB7theNIGoa+GJ/?= =?us-ascii?Q?RbAmLTyXLsRf3DpwRMqMUGi/bSIvk2AB9tL92q6yqhBwAtzRz8KWxYwrbKTB?= =?us-ascii?Q?qrmG/CU2wm3CLcJKAROJX6h0VoBNMUupTrPoAFOYhNWTel8cYiqekF+bj8KM?= =?us-ascii?Q?vPqZWnN23IZH59Y1XtuYrN/5mqupOGLlx2zlsFIObt+jsiB+zfMbag4SayNk?= =?us-ascii?Q?zvXSLyP5V/dip30X/YUAQ8Tamk5Ak0pnLOjc5bBePoEBIM7mQ4TK9Sq4ZceB?= =?us-ascii?Q?GGht8oq0FXaqfl5V2z893HmVuYQc+WR6VF+E7WKTH5q97oS1xW/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wBEXqmy02q0+oOBiSvUPfd7AIHFQC00BQ?= =?us-ascii?Q?XR4GjqQhfxJbo/6RmqxAlfi+TqgM7a3hXROJWQEczH+wwh9oHjJP+Gj2ACOp?= =?us-ascii?Q?kOC2UfQmPtrxUVSa9hNKtBc1gDwNCXiIAt/zWUT/?= 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: 2b3aceff-767a-407e-c8a5-08db528f5839 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2023 02:19:41.6762 (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: MdygwMZ+0vmHWVVcyHJm1LBpoI7xqO11h69MGq3dZaYvLwN3UJPuNHeKVzp0O/JEadYtMYtwA2DZqIKIu2/CRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6122 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 Agree, thanks comments. > -----Original Message----- > From: Ni, Ray > Sent: Thursday, May 11, 2023 3:48 PM > 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 >=20 > Jiaxin, > Let's keep using 48 or 57. > We can use separate patch to clean all existing code to use 47 and 56. >=20 > Thanks, > Ray >=20 > > -----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 pa= ge > > table to permanent memory > > > > What's your comments to the existing code logic for the PhysicalAddress= Bits > in > > the CreateIdentityMappingPageTables()? Looks all doesn't consider the = sign- > > extended case? is it reasonable create the paging but not used? All sys= tem > with > > long mode are sign-extended? > > > > // > > // IA-32e paging translates 48-bit linear addresses to 52-bit physica= l > 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; > > } > > > > > > > -----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 > page > > > 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 > code > > > itself is responsible for > > > > supplying the sign-extended linear address. > > > > The page table creation logic still maps the entire linear memory s= pace > > > 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 ident= ity > > > 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= it's > > > better for efi boot services to restrict themself to the lower half. > > > > > > take care, > > > Gerd > > > > > > > > > > > >=20 > > >