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.web08.337.1630541153758411640 for ; Wed, 01 Sep 2021 17:05:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=cd38XgTr; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: min.m.xu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10094"; a="241175764" X-IronPort-AV: E=Sophos;i="5.84,370,1620716400"; d="scan'208";a="241175764" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2021 17:05:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,370,1620716400"; d="scan'208";a="499192921" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga008.fm.intel.com with ESMTP; 01 Sep 2021 17:05:47 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 1 Sep 2021 17:05:47 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 1 Sep 2021 17:05:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 1 Sep 2021 17:05:47 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 1 Sep 2021 17:05:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QON8+WsQok9An+8uu43NquotY3lnU8UAdAyl1F+B9L/S05gbvGASObU/hmpZ6XYequUMQufDnln03SYiCUqwXpVMQVl9y+MRwsVbA7toqn2GX2A/mpnkFmg7Ywv0j0CyLAu2QYhoX+XpITRiSppN1jzx8veybBgow6E9cE7ff1OSyWvsjWT73KTZ1j42fPv1TdL4D4fHmzR1CyM9ITFycULmZjuAQqQlsEfvW5Wq18P4WY6Mcu/VMEVw4wYEQVwIQJhHf/tx6RikhW4ZG8dY/43m40yldasvVDnbR2fPxQ2Kr3xRXps9A2Kl7gOJQDKuXX5K/z4UkdffMOoTEHovuw== 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-SenderADCheck; bh=/LPxEe6/wQS/BaCBWU44/D8qB0wcSQcr3NZ8wSs0P08=; b=B+tyEvI8hsKwKQ5dX6ndM3ymHYjZWeuwCrHNrBcIxmDLfvzeofUWOoeW1+mlOm7//OL6Z45GY7MTfy3AX4cgDaT1ZHeV6MAMzW8ECnM/f6L1cfhx+7rPnfyjT0pz2FFkyNWRu/dLK3K88jQyYL0IZtq3jGYg6oqAwiORUeyej2lzSGqrE44HMJChp/3V6piHM6KvMWSl9/6+EJsL/zJ2ATh2YAJX+Mu/wm+mAmX/22aZwAE3mcKEXrLtq2BDjteuBEWSfA007to9DyVarIWUi96ohcK8LtuuiPGXqG4db4j6oVFYPUvzPKl2NzdgK/o5NhmCEt5KHxRa9aeyYZF8fA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/LPxEe6/wQS/BaCBWU44/D8qB0wcSQcr3NZ8wSs0P08=; b=cd38XgTrQr9W2IMRPT7O+g4+iSewAYqFL4BLh9Ssxz257xvIfa2W9DcNxk9wHfJP8uG7z3oXSALxVO/s8df95oZGzMZZSa7od3wns5Ssj6Qvk767DXOBcg53UEzzzkF2n+fovENFD7Bd5Q23RHs3XJ6RhooBJPU97w87q+HaAwo= Received: from PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by PH0PR11MB5190.namprd11.prod.outlook.com (2603:10b6:510:3c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Thu, 2 Sep 2021 00:05:45 +0000 Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::c93:200e:5aeb:e11b]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::c93:200e:5aeb:e11b%3]) with mapi id 15.20.4415.029; Thu, 2 Sep 2021 00:05:45 +0000 From: "Min Xu" To: "devel@edk2.groups.io" , "kraxel@redhat.com" CC: Ard Biesheuvel , "Justen, Jordan L" , Brijesh Singh , "Erdem Aktas" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [edk2-devel] [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf Thread-Topic: [edk2-devel] [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf Thread-Index: AQHXnUe8X7jjLtXUt0aYMxY+W+0FeauLqi4AgAFA1CCAAC5bAIACxYsA Date: Thu, 2 Sep 2021 00:05:45 +0000 Message-ID: References: <81c97a782bbbf83043854ad8a86d14604918d788.1630289827.git.min.m.xu@intel.com> <20210830074058.22gfqmzrha4su6fh@sirius.home.kraxel.org> <20210831053510.ian6sqpefzmrrfi7@sirius.home.kraxel.org> In-Reply-To: <20210831053510.ian6sqpefzmrrfi7@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b8b3e8ca-de6e-4252-005c-08d96da569a8 x-ms-traffictypediagnostic: PH0PR11MB5190: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fKegI0F3zzn+oToh0iYE77mqM4/zDhB7Yv/AayuOvU/etNhY1S8X28DLN2Ro5tcUS8phbWMD/5p3rRGf9Z5ATpqxKAXTbQvJ69ckcfqwAJMtMcuV97EnN5haeGjSB46JYzO6qd2Alsgk2XnCOocu/5Ao+rT49stwxjqcQYkw0mPboIb2LWQpAC9mdylJpTMyddmiaNVe7j+umPPVdgVf1bjr/GmQ8ZAZmL8Jjz9v3p987epiachF/2KUXfoeoz2lnLQdUjsxyTG/60aA0X6bAgxz2LabnjI9Mz3N8jqWaZ+VPNmm+2pPZPZgW+mEtnsVqZne1HjNtBotPG0R6tcxj819ZCD3a/C3uaZuH9j7HmW+eXAlhMeZnG+XnGo1A+trbzMrgFTkavFmLuB0cmSSxlvr3htiWxjNjh6MTHkr+Rav7jlBmKLTjS/KKvZomZI9KfLbmeMFS2YC8I9qyHsP/bjvYY6wy+AY7RzBfjQuoEANUO0EASqUjF3ROpRUBhdMzn1YP6qegj77GtKY3kgsGq1R9BCeEALQwTDr6Jn1NgwOWlTFmK+xFuRiLs/VF9aGW2tW3NElQyYDaJPZMjV1whWa+BNh92sC34ngC7mOD8MQX7UDkEmRiF+r3AWkvaa+I7/qCpWZuctOK01sCCTr/ByveDL1vWtBo+S5GQNg8JkpPYejXGgRByIXOpShZhpsy7cEBf1F1VlQXTZj24Y9CgfwdgUFQFbtR2sb/P9jFEayZteF03AZU9e1jtZrsxMdvPD9ARGszVWbvrMF/zY15pbiO6KyjVPs/6Q33CG0lzkIiFVBYOQbZFhUvu3carimM5RIQRl+ZXzbB+ldisL/qg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5064.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(39860400002)(376002)(366004)(346002)(136003)(86362001)(110136005)(478600001)(26005)(52536014)(5660300002)(316002)(71200400001)(66476007)(66946007)(2906002)(122000001)(8936002)(64756008)(966005)(54906003)(66446008)(76116006)(66556008)(38100700002)(8676002)(9686003)(83380400001)(55016002)(38070700005)(4326008)(33656002)(7696005)(186003)(53546011)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2S2mGbb6EFjdwovt237qHoqVdQcYWt+DHLKZEaGK1YjVNRpyPmjmWd1x3Dav?= =?us-ascii?Q?CHg6YSpUALT8wtCAwBXnDWe8uQe/Z0cNlFeN7hx43OOaJc4fIUfqdi7inuJe?= =?us-ascii?Q?AWPPnTwbqIntwIHAlDT1qB3RqpV1rvLPm6NGsCptlLjl8qIVE8D6EzAiZ7Jn?= =?us-ascii?Q?JsgubecjhxzUo/ozKYWtPnQ7tkKsHJqkMBK9/h/Id12wKktWnJ+Ea3FFi66T?= =?us-ascii?Q?Of0QG83U14wSZTZZOlSF6kxEU5o5HwYQXhV2hFPrsbVB39rBFbKVbJ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PYzUokXm7NxnuKi3KrmCUuZOsM/NwMaON9kUy8cFQ0?= =?us-ascii?Q?eqyzjUYoSvi92jCVKFWV3ke2571FyFQJLID3TC7Wnua3b41/WojIke7r8OMr?= =?us-ascii?Q?Cm+FBT2Ub+o/s5lQeyqE65sTU4ocodpD6Pfcb1yg8y/y4LCjZYn3jxk0WczJ?= =?us-ascii?Q?IT1bxYTTHpqZM9FHOYh2MqTu?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5064.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8b3e8ca-de6e-4252-005c-08d96da569a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2021 00:05:45.7622 (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: 9ce4/zfryPrK7PqJWo46LStWZvfHqqAcydIEfP9vvf0hVKMLjjafx2wfP+DYvhz32w/0ChJrg0dFcam0AtGmFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5190 Return-Path: min.m.xu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On August 31, 2021 1:35 PM, Gerd Hoffmann wrote: > On Tue, Aug 31, 2021 at 03:09:08AM +0000, Xu, Min M wrote: > > On Monday, August 30, 2021 3:41 PM, Gerd Hoffmann wrote: > > > Hi, > > > > > > > _TdxPageTable: > > > > If 5-level page table is supported (GPAW is 52), a top level pa= ge > > > > directory pointers (1 * 256TB entry) is generated in this page. > > > > _OvmfPageTable: > > > > Initial page table for standard Ovmf. > > > > > > Hmm, isn't 5-level paging independent from TDX? Why mix the two? > > > > > > I think a top level page directory should be added to the standard > > > ovmf initial page tables instead, and setting up 5-level paging > > > should not happen in tdx- specific code. > > In current Ovmf implementation > > (OvmfPkg/ResetVector/Ia32/PageTables64.asm) > > there are 6 pages reserved for initial page tables. It doesn't support = 5-level > paging. >=20 > Sure. And I think we should add proper 5-level paging support to the cur= rent > ovmf implementation instead of adding hacks to the tdx code. My understanding is that we should first add 5-level paging support in OVMF= , right? I am planning to add 5-level paging in OvmfPkgX64.dsc. Any comments? >=20 > take care, > Gerd >=20 >=20 >=20 >=20 >=20