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 93C3B941980 for ; Wed, 10 Apr 2024 14:02:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=EWnhQpq/QOHBeLhxkcmCNOokiQ/qRxRnQUfWdVsyFos=; c=relaxed/simple; d=groups.io; h=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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712757728; v=1; b=hph004HL+0fZxjFNlLqrNsDQZGUc1TQbSRdt5DN5SGuAn6wf5pUVHDNlvK0kdyd27QPNHPPP RNryMOffEy2jmApunPJN9D8ayQrDwnj0DWf1i7X90QzH10xUnn79JwAZsxQBI6oz4kGHS8SieUl 7GlHv24cQTgju3YHmQhFR55+aZqufmiMwAO2X7lgubcxUHsx3x6ePF5IuytyG508EWIsSpTCQ7g xT3HY0kTRx8LmG/nyZJQxOkEhPx1hlo5ksg3KS+QRS9uoBR5YvNJgOH/o+1oPoyPsOekZ86f8+L ghDDMAnoXuknlgmbaH8C76MUXV6l1TF5/FU63P479cTzg== X-Received: by 127.0.0.2 with SMTP id ebthYY7687511x2DTANUQ3s7; Wed, 10 Apr 2024 07:02:08 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mx.groups.io with SMTP id smtpd.web10.438.1712757727555621009 for ; Wed, 10 Apr 2024 07:02:07 -0700 X-CSE-ConnectionGUID: QpwcQLNLSgKUwnAVU02jMw== X-CSE-MsgGUID: j0ydD4ZZTMqsYDfy9k3nkA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="11898125" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="11898125" X-Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 07:01:42 -0700 X-CSE-ConnectionGUID: pWRne5acQJ+zxjcxSH6cBw== X-CSE-MsgGUID: vlh6nR9pS9uO69KQ0zWnDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="25084930" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 10 Apr 2024 07:01:40 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 10 Apr 2024 07:01:40 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.35 via Frontend Transport; Wed, 10 Apr 2024 07:01:40 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) 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.2507.35; Wed, 10 Apr 2024 07:01:40 -0700 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by IA0PR11MB7353.namprd11.prod.outlook.com (2603:10b6:208:435::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.26; Wed, 10 Apr 2024 14:01:35 +0000 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::be3f:5a4f:5180:2ba9]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::be3f:5a4f:5180:2ba9%4]) with mapi id 15.20.7430.045; Wed, 10 Apr 2024 14:01:35 +0000 From: "Yao, Jiewen" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Zeng, Star" , "Gerd Hoffmann" , "Kumar, Rahul R" , "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" , "Ard Biesheuvel" Subject: Re: [edk2-devel] [PATCH v1 00/13] Add SmmRelocationLib Thread-Topic: [PATCH v1 00/13] Add SmmRelocationLib Thread-Index: AQHai08O55cbXHMN3kmg7WC3wlRBtrFhiE4g Date: Wed, 10 Apr 2024 14:01:35 +0000 Message-ID: References: <20240410135724.15344-1-jiaxin.wu@intel.com> In-Reply-To: <20240410135724.15344-1-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|IA0PR11MB7353:EE_ 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: mfZpYNhiqNSMp0hvJw/VDlBz3U8HDaOMIyop+fZ/Iv6wx2ot8vqCXyVgHU6ra0FWP8zAp/Y9GtF3zYllqpRzc/eBdoNE5XOQMk34VobyQkDn3KXUFPhlKVAOTOaZj4s7En57OWYHYMBB8niUGsT3+IGIr7WogmwjOZQmt/3Z4yB8bAjBeW8LtI/quRuw2pQTzW2KitHHhwOEgzhu3BXcYPH00q9aup6whf2ROgboFlWE+Tf19lFZ9IT6yxKaFZ0VKd6iRT9M+8ZkUMGf37IyRtf39F+BHK3led2DzKQNg8j221t9NbXG/AmNyistMMaKS56sjQAVLYmEhTdcxvsQkgr1W9civL78E7V2129jlFnzTBD3PUBj82FdS7atfIHOCQ6c8QRovvongkjYV8qaNCPpv5URBzJfMWAS89+UOVLKm0aVx8VQCFhw9pMal70Ym9B7lE39GER126h7VR2cbFd9hSRZU2RqDcZJrJi3pbl0p/UVWaHzSfPgZqtCKY4rW11uzj3z3twlZs2Hx6NTIuYaZER00rGGrcvr7K46WGXjKtoHPDQB9oqmVdMKpUwbhGSZxLVPKn2VwmmPwanwGjjzAQClfIfnr6oMkXHJIfUMEBzB62EeUjFIuSy4+9xiDFzt9jnBSYO5/Pgireax7+uhy4fum2T8feTCjwdMDXg= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XzQzTMnjFDe6DYQf5/X5XgG5LqY2ywOhbBVldjM86jzGZUnOMr5Cmco2jPZi?= =?us-ascii?Q?GQVY4EhqYu344c9yu9KDi8IBMVkqecczBK+k5jtMaeSY0p1c8BoohObSWi+Q?= =?us-ascii?Q?KTfTFRhVSfXe/KYePUOdkJbCOjucAM/hQxirn/HK++rNtSlaM7nN5jLKtELa?= =?us-ascii?Q?mOdLbT2O8Bkhbl7KkrqF6pWHmIRrY8wWgOiA94MPvRFK22nosHRC3wTtfaby?= =?us-ascii?Q?7hcfKFIkdqeSY99SvurGjxbO4Oro9CoL0yPAD6nw+4AJ7XVXQab6x9rnv/6I?= =?us-ascii?Q?0xEwvyM9oQZsvEHBdU5pFiQWF2Xqv7WhgOtZFj7/jTmaZ8oW67SpzsrJIde4?= =?us-ascii?Q?0p1Y1dP4QPz/10eup07FhdkW4S/rFsshhwq1bWu8e0y6wPzTVFCBWVzNqfJD?= =?us-ascii?Q?WUPnP/CDxv65+kMrwm/N5SPloJfeRmhJxr5RhKmwj3t/7WeZWXf3IFMTgf2n?= =?us-ascii?Q?sCw9e7QwQPmzkohsAcGh3T35vx12xj6hoepoJFaNiWF4/IfrGamVmcw7APIg?= =?us-ascii?Q?1g2m4fZTsyrqC9tSwL2/pG2Zp8G748lS8LnhkL5MaDT1jJ4U+4RZJ1/QH5XA?= =?us-ascii?Q?XRkyNEJGMFQVpd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us-ascii?Q?azSf+A3SLgIlMi97o+w3dLgZ2L5GFMFlztSzCPuyvVAzrcuy14gXsCeJlhZ6?= =?us-ascii?Q?HlyPJTL1HIkYCBU3pYfuP60O0EcsBYyuy39mKKha?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cae21f4e-48df-49e7-be34-08dc5966bbff X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2024 14:01:35.5240 (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: LgsnkSjKwVWNUnLmHBcwEL122vtqbQcm3vJeEjC32zVtx0NwleCCrDCfT912MC1V8mPhq/Ve9RW4wR5J7c4tZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7353 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 Resent-Date: Wed, 10 Apr 2024 07:02:07 -0700 Resent-From: jiewen.yao@intel.com Reply-To: devel@edk2.groups.io,jiewen.yao@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MzgI0CTeikNsu8xLGbDgCiFyx7686176AA= 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=20240206 header.b=hph004HL; 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 Hello Would you please describe what test has been done for OvmfPkg? For example, have you validated OVMF with SMM enabled? > -----Original Message----- > From: Wu, Jiaxin > Sent: Wednesday, April 10, 2024 9:57 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Zeng, Star ; Gerd > Hoffmann ; Kumar, Rahul R ; > Dong, Guo ; Rhodes, Sean ; Lu, > James ; Guo, Gua ; Ard Biesheuvel > ; Yao, Jiewen > Subject: [PATCH v1 00/13] Add SmmRelocationLib >=20 > Intel plans to separate the smbase relocation logic from > PiSmmCpuDxeSmm driver, and the related behavior will be > moved to the new interface defined by the SmmRelocationLib > class. >=20 > The SmmRelocationLib class provides the SmmRelocationInit() > interface for platform to do the smbase relocation, which > shall provide below 2 functionalities: > 1. Relocate smbases for each processor. > 2. Create the gSmmBaseHobGuid HOB. >=20 > With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at > a later phase) can be simplfied as below for SMM init: > 1. Consume the gSmmBaseHobGuid HOB for the relocated smbases > for each Processor. > 2. Execute the early SMM Init. >=20 > Cc: Ray Ni > Cc: Zeng Star > Cc: Gerd Hoffmann > Cc: Rahul Kumar > Cc: Guo Dong > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Signed-off-by: Jiaxin Wu >=20 > Jiaxin Wu (13): > UefiCpuPkg: Add SmmRelocationLib class > UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance > UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD > UefiCpuPkg/UefiCpuPkg.dsc: Include SmmRelocationLib in UefiCpuPkg > UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib > OvmfPkg: Include SmmRelocationLib in OvmfPkg > OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > OvmfPkg/SmmAccess: Consume gEfiSmmSmramMemoryGuid > OvmfPkg/PlatformInitLib: Create gEfiAcpiVariableGuid > OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not > OvmfPkg/PlatformPei: Relocate SmBases in PEI phase > UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic >=20 > OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + > OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 104 ++-- > .../Library/PlatformInitLib/PlatformInitLib.inf | 6 +- > .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 33 +- > OvmfPkg/Microvm/MicrovmX64.dsc | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/PlatformPei/Platform.c | 1 + > OvmfPkg/PlatformPei/Platform.h | 5 + > OvmfPkg/PlatformPei/PlatformPei.inf | 5 +- > OvmfPkg/PlatformPei/SmmRelocation.c | 80 +++ > OvmfPkg/SmmAccess/SmmAccess2Dxe.c | 4 +- > OvmfPkg/SmmAccess/SmmAccess2Dxe.inf | 5 + > OvmfPkg/SmmAccess/SmmAccessPei.c | 88 +-- > OvmfPkg/SmmAccess/SmmAccessPei.inf | 7 +- > OvmfPkg/SmmAccess/SmramInternal.c | 73 +-- > OvmfPkg/SmmAccess/SmramInternal.h | 18 +- > UefiCpuPkg/Include/Library/SmmRelocationLib.h | 42 ++ > .../SmmRelocationLib/AmdSmmRelocationLib.inf | 61 ++ > .../SmmRelocationLib/AmdSmramSaveStateConfig.c | 109 ++++ > .../SmmRelocationLib}/Ia32/Semaphore.c | 13 +- > .../Library/SmmRelocationLib/Ia32/SmmInit.nasm | 157 +++++ > .../SmmRelocationLib/InternalSmmRelocationLib.h | 141 +++++ > .../SmmRelocationLib/OvmfSmmRelocationLib.inf | 61 ++ > .../SmmRelocationLib/OvmfSmramSaveStateConfig.c | 107 ++++ > .../Library/SmmRelocationLib/SmmRelocationLib.c | 659 > +++++++++++++++++++++ > .../Library/SmmRelocationLib/SmmRelocationLib.inf | 61 ++ > .../SmmRelocationLib/SmramSaveStateConfig.c | 91 +++ > .../SmmRelocationLib}/X64/Semaphore.c | 13 +- > .../SmmRelocationLib}/X64/SmmInit.nasm | 93 ++- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 21 +- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 96 --- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 6 +- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 322 +--------- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 98 --- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 4 - > UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 69 --- > UefiCpuPkg/UefiCpuPkg.dec | 3 + > UefiCpuPkg/UefiCpuPkg.dsc | 3 + > UefiPayloadPkg/UefiPayloadPkg.dsc | 2 + > 42 files changed, 1850 insertions(+), 817 deletions(-) > create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c > create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/Ia32/Semaphore.c (72%) > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/Ia32/SmmInit.nasm > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/OvmfSmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/OvmfSmramSaveStateConfig.c > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.= c > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/Semaphore.c (78%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/SmmInit.nasm (57%) > delete mode 100644 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm >=20 > -- > 2.16.2.windows.1 -=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 (#117603): https://edk2.groups.io/g/devel/message/117603 Mute This Topic: https://groups.io/mt/105441987/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-