From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A5A98941612 for ; Fri, 2 Feb 2024 08:31:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8h/l/otZYLPZCzC/MG9Vf+VPSAD6+2BN1BsLswWk39g=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706862690; v=1; b=gXCQK5zOB6l45DsW3KGDQf0Lfv6tMWKgvqfg/HvRNQN+pxomSJ1qy+9jXNvcAajvTl9/LDn4 /TKCEm31gI1fh20x3P0lnGvodJCffJFRVt38cSLHIBrH5WhfYQE2biIy/pd6XPZctzfxGmRztpj ajNWZK26o23HgI1lEfZHVv/s= X-Received: by 127.0.0.2 with SMTP id ekHsYY7687511xddmBayolxo; Fri, 02 Feb 2024 00:31:30 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mx.groups.io with SMTP id smtpd.web11.18627.1706862689368520346 for ; Fri, 02 Feb 2024 00:31:29 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="10759553" X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="10759553" X-Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 00:31:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="25230" X-Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Feb 2024 00:31:29 -0800 X-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.35; Fri, 2 Feb 2024 00:31:28 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.35; Fri, 2 Feb 2024 00:31:01 -0800 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.35 via Frontend Transport; Fri, 2 Feb 2024 00:31:01 -0800 X-Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.40) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 2 Feb 2024 00:30:58 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GwUdxuFJ8jkMtzXuYjsGdlf5cKcMg8JZaTUVKm/LnCfUy/k1iaXbOMhT/wwvAUvfdzY7Tbu13TGG1/c4EYh1i3XpQ4wf/YESjqhrEIyynTSkQWU17WAmWEYMjn3W0OBuEaLAeQR2h3ch/E8n6AHQe3BabJXTRmwEySnEV/ygv06qHuTjuwZ3yuiWUyKqrYdJKSpx3HvHDhHTwyaepAZR9HaA1CjEl4RiSii/s+1R6+EedFOwI1j74tj9MftnUvTP0dlUI8PR+X1hMBdHaiq+pPqQ7Ns3TqqU+5P4C3NC1CLil0jRCBv1gx+vvcg13hsB8IGj0UwRYaf1PC/o0AfFfw== 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=6YKntex3lgCijjLAOD7I5Xi/zgs6+HIdclfksbTJr0o=; b=T16D5ev0GqG536WUdXcnS9N/GdETg3l5g3oaMbxXKA98rGWhhmeMytNZg6Ox0Ner6D1s3oqb0kvuTWT+TbjG60hc7nKQOy57JOruaJy1F4HdHHUNMUeiu878FX+0xYR8sWpEa5PZdyOLaQc8uXBq2Km2fmV/6C+rliy/KmPvGQjPIM9iabVLjPthd4F9IOM0+Z3bYLBpulVbDHJOZKrrD96MayoZM783iP85xdJT4K1xoLQtEbhH9xz1sridQOrZkiS/+sbbXHEqXtKYvmBaf9als23yM0YQAFxx0J5OsxvDFHPlmolxLvBoGAY28G+J53fYQ81QwdYoiz62woI6jQ== 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 X-Received: from PH0PR11MB5064.namprd11.prod.outlook.com (2603:10b6:510:3b::15) by BL3PR11MB6481.namprd11.prod.outlook.com (2603:10b6:208:3bc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Fri, 2 Feb 2024 08:30:24 +0000 X-Received: from PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::e526:b83e:9ee1:c862]) by PH0PR11MB5064.namprd11.prod.outlook.com ([fe80::e526:b83e:9ee1:c862%4]) with mapi id 15.20.7228.029; Fri, 2 Feb 2024 08:30:24 +0000 From: "Min Xu" To: Gerd Hoffmann CC: "devel@edk2.groups.io" , "Aktas, Erdem" , Oliver Steffen , "Yao, Jiewen" , Ard Biesheuvel , "Tom Lendacky" , Michael Roth , Liming Gao , Laszlo Ersek Subject: Re: [edk2-devel] [PATCH v2 0/5] OvmfPkg: Add support for 5-level paging Thread-Topic: RE: RE: [PATCH v2 0/5] OvmfPkg: Add support for 5-level paging Thread-Index: AQHaU3hdsogluDnN60OinE0VHIhglrDzcW+wgAAlaICAAWTd4IAAj1eAgAExc0A= Date: Fri, 2 Feb 2024 08:30:23 +0000 Message-ID: References: <20240130123204.764453-1-kraxel@redhat.com> <3jj3lyr7gmuzzdp6f7dnj3ow6sox5uikdx7ysb6xuoxryghuzn@r3jatiaty24n> In-Reply-To: <3jj3lyr7gmuzzdp6f7dnj3ow6sox5uikdx7ysb6xuoxryghuzn@r3jatiaty24n> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5064:EE_|BL3PR11MB6481:EE_ x-ms-office365-filtering-correlation-id: cdbf3f06-2094-4fce-2295-08dc23c93373 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: Hh8KGt5zw4FIzhE2ZF9Ca4EiHyaTzsWWLgYgn1WWPJsFmvFZgxgEuZX/5Jg53+gCJCg+JCbe7LJDzaFbOx8Zc93ozeEehJwIgMU7RsNVIriUuuarzmVyo5h0VAy+xbOS7/++sfAspG86Egou1HJwDwLX84esHWb/Hg6UHw3UuF38Y0Hv9HRX0eFPof/VAx6PBf0F6XVPASycLYcuU/wkJ62sXcAtu2vTbJ7NPHMCT+Y2DtvzbpqtbXiwmymouIi8ckmsCOxWhjG9y31wgxvjaitBEX+/KgXCcsYJxB+V/F9kiBTvmPWS0WRAbML+KIVEjqOgfn6a3wLrnI5zQ9TKcopWtilR0CZy08Cv1bPyLDFdcVkf7Jyyr/w1zFpWrw/sa0WPn8jpnSdnuukLsZPu7/J8A3dt9sqixP8wHbBEj/5B6IUNcIHDe2Z/wHPb9cC6kdYdd0S5nuApz+xseBK4gzSUT9Ur3M3dqrYjnN2RLuTZ2FSqOepv21s9zbq2AWA/ZqiiSyYI0umfknvS08zow/4vm56TC/MViPYPL4wrpX7BbpGn+Lkd3aLrhf5W42gL8hSt5BqQmxtljFihpMLk+sozD0UOpMoezWM+cNLtmgk= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wM/Ng9p4nYiFuvbIbfM5y8JP1zhP29vL3o9DQBHXEiiNxHMYmEKNz+PfAlO4?= =?us-ascii?Q?nFgrsxiqp7Ml0WuzQB+HgFbJcqVLcAGLRulUm91cMMkVNpF4GHx7ZfY+7ur6?= =?us-ascii?Q?GXi/qioAcpo7BHs+Z0EvLwF2QYZYa12zJDekQh37mVAzmLM+YSC9X4t+S7f5?= =?us-ascii?Q?0DywoCuU0AmQIY1EZx+6RVwsRz7cKHQRXz3LQ1/s54BXmNjZ7jyWL8nRiQxM?= =?us-ascii?Q?DPkr1M0dH7vN8qbHSsDIxB7z/ucQgsH5RcZo7ILMhHYQY6ZYcOMEZ7tv54Pr?= =?us-ascii?Q?oSDVIiJGGXWMXPXDUaAqOqSSp3bV35RqJ8uUSIHxIQ5chQYNJO0fjdZivy9Z?= =?us-ascii?Q?M4gTuCcduF/PK8auG3iCvmn3O3E5431RrAY5mClqkEEGsifTUYe5PDIuUOjr?= =?us-ascii?Q?g8dNJOh0EsTC+SU7a6o1zcYXe0R74TRTaMRNzcuuPopIPLYDIN86dPWs94fy?= =?us-ascii?Q?8tVQJfjZUb9h1Jm2Byd0RbEssqycvUEl0pHMq527zrLyUecoE5H210ko8Hs3?= =?us-ascii?Q?1pHyBjfJ3QxtBc7+PhyvOTFIueC9858m96yB5ZHHfyXPFdFoxdWAB41j0tdY?= =?us-ascii?Q?crHBx/TPREboIXTnWXmvrv7WJb3pNYWf8SdKKYS2dGE4HMvI3HnBlXtsjPnC?= =?us-ascii?Q?u6nEx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rwww65?= =?us-ascii?Q?/Jw4LwR+5Xkk78sxzHdELlVvDJM91M3XgUzzVv4/?= 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: cdbf3f06-2094-4fce-2295-08dc23c93373 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2024 08:30:23.7764 (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: +QE19nznhDXIR/UN4IcGgsAsQMQdbmNmmvClZR7QMI8heu5FUe0EAMV62/ctEGLqT9IXP8uR6CHTPBc7x2fHvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6481 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: vdryWmN6cxbtWuKxTiDYL4mgx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=gXCQK5zO; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Thursday, February 1, 2024 10:15 PM, Gerd Hoffmann wrote: > On Thu, Feb 01, 2024 at 05:44:30AM +0000, Xu, Min M wrote: > > On Wednesday, January 31, 2024 4:24 PM, Gerd Hoffmann wrote: > > > On Wed, Jan 31, 2024 at 06:19:38AM +0000, Xu, Min M wrote: > > > > On Tuesday, January 30, 2024 8:32 PM, Gerd Hoffmann wrote: > > > > > > > > > > Patch #1 has been submitted separately last week. > > > > > Intewl raised concerns that removing or renaming the PCD breaks > > > > > platforms, so I'm just doing the minimal fix here. > > > > > > > > > > Patch #2 + #3 update OvmfPkg ResetVector and PlatformInitLib for > > > > > 5-level paging support. > > > > > > > > > > Tom, Min: can you test this patch set with SEV / TDX? > > > > > > > > > We test the patch in TDX with PcdUse5LevelPageTable TRUE. It > > > > failed if the > > > td-guest is configured with multiple vCpus. We're investigating what > > > happened. > > > > > > My first guess would be we need to somehow propagate to the APs that > > > cr4.la57 must be set. > > Yes, we make a quick poc that set the LA57 for APs. It works in multipl= e > vCPUs scenario. >=20 > Pushed branch with two experimental patches: > https://github.com/kraxel/edk2/commits/devel/paging-5lvl/ >=20 > One for tdx, writing different values into TDX_WORK_AREA_PGTBL_READY for > 4-level and 5-level paging modes. >=20 > One for sev, which adds a 2-level page directory for the first gigabyte a= nd > places it at the same physical address it has in 4-level paging. > With that SevClearPageEncMaskForGhcbPage should work unmodified in 5- > level mode. >=20 > Test results are welcome. >=20 Thanks Gerd, it works in TDX. One typo in the patch that pageTableEntriesLo= opla57 and pageTableEntriesLoopLa57. Thanks Min -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115033): https://edk2.groups.io/g/devel/message/115033 Mute This Topic: https://groups.io/mt/104052206/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-