From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3A5E5740038 for ; Wed, 8 May 2024 16:44:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=70jheV/S3hD/7Q/0C8vz2mTAZtrRLg0tFFr29g9tvXw=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20240206; t=1715186651; v=1; b=Ig/yTwB2npidEvQt9iQjhubFt48Tl3HZyG/IeEs4SGgwzGbEJRGRNoVPT+P0bihVlkaJBU+s 3i7uZX2j5gHKJJCibBMVy0Aqt6gAaT0WoAAozR2p3OXiEL4+NjFHhXe7ooILCXIvxWBcTe4orDS DIWsaC05HrZ6IJYCzyEbTvOqHjfFf6AUa8d4VXNnRxbW++vj+dpGWjRBo7gemcjeU67PYKsRzEs nNQFVBT7ixRSNFqEQKCqAoaOR0PMN+4/6/QD3dPHZjqhyv9CPfzsEqHhdTN0LsCozQ4/qdbbaJG OjhEAgrS2vbSgypeB539ykSPW2g9ctO/qYJ8poKISLzzQ== X-Received: by 127.0.0.2 with SMTP id hE3HYY7687511xH1HZDnSh53; Wed, 08 May 2024 09:44:11 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.1930.1715186650772931655 for ; Wed, 08 May 2024 09:44:10 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2C67B61C7B for ; Wed, 8 May 2024 16:44:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA34BC32782 for ; Wed, 8 May 2024 16:44:09 +0000 (UTC) X-Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2dac77cdf43so59828261fa.2 for ; Wed, 08 May 2024 09:44:09 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVW9sROvO2V542U+4xIVSxGe742VYK49pI6N5c5fB2gd7z9Ek81u0HjZfCBhmeLNAjeu8A5GQppvOC0ZZxkL9IicL/bgw== X-Gm-Message-State: oJew8lY5pyWDFJAnHX5SOLOwx7686176AA= X-Google-Smtp-Source: AGHT+IFB9k4ikdaXVcoLbS3zNPvw3z3SfuU+M4iSwL4TRriKDgKDSJvaQ8mXQOigdIeeLNPUgqBXa7WPoOuhjRCc7K0= X-Received: by 2002:a05:651c:1a09:b0:2e0:a39b:2b25 with SMTP id 38308e7fff4ca-2e4476b489bmr24237161fa.48.1715186648092; Wed, 08 May 2024 09:44:08 -0700 (PDT) MIME-Version: 1.0 References: <20240426121720.54308-1-jiaxin.wu@intel.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 8 May 2024 18:43:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib To: "Wu, Jiaxin" , "Liming Gao (Byosoft address)" Cc: "Yao, Jiewen" , "Ni, Ray" , "devel@edk2.groups.io" , "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" , "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" , Abdul Lateef Attar , Abner Chang , Tom Lendacky 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, 08 May 2024 09:44:10 -0700 Resent-From: ardb@kernel.org Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" 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="Ig/yTwB2"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Happy to merge this. Liming, please let me know if this meets the soft freeze requirements? Thanks, On Tue, 7 May 2024 at 07:18, Wu, Jiaxin wrote: > > Thanks Jiewen. > > > > > > > > From: Yao, Jiewen > Sent: Tuesday, May 7, 2024 12:59 PM > To: Wu, Jiaxin ; Ni, Ray ; devel@e= dk2.groups.io; Ard Biesheuvel > Cc: Zeng, Star ; Gerd Hoffmann ; = Kumar, Rahul R ; Dong, Guo ; R= hodes, Sean ; Lu, James ; Guo, G= ua ; Abdul Lateef Attar ; Abn= er Chang ; Tom Lendacky > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib > > > > Acked-by: Jiewen Yao > > > > From: Wu, Jiaxin > Sent: Tuesday, May 7, 2024 11:39 AM > To: Ni, Ray ; devel@edk2.groups.io; Ard Biesheuvel ; Yao, Jiewen > Cc: Zeng, Star ; Gerd Hoffmann ; = Kumar, Rahul R ; Dong, Guo ; R= hodes, Sean ; Lu, James ; Guo, G= ua ; Abdul Lateef Attar ; Abn= er Chang ; Tom Lendacky > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib > > > > Hi Jiewen and Ard, > > > > @Yao, Jiewen, @Ard Biesheuvel, do you agree we merge the change related t= o OVMF package since you are the OVMF maintainers. Please help check /revie= w. > > > > The patches have been acked/tested by the Gerd. > > > > [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVM= F > [PATCH v4 09/14] OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > [PATCH v4 10/14] OvmfPkg: Refine SmmAccess implementation > [PATCH v4 11/14] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is = done or not > [PATCH v4 12/14] OvmfPkg/PlatformPei: Relocate SmBases in PEI phase > > > > Thanks, > > Jiaxin > > > > From: Wu, Jiaxin > Sent: Tuesday, April 30, 2024 6:14 PM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Zeng, Star ; Gerd Hoffmann ; = Kumar, Rahul R ; Dong, Guo ; R= hodes, Sean ; Lu, James ; Guo, G= ua ; Ard Biesheuvel ; Yao, Ji= ewen ; Abdul Lateef Attar = ; Abner Chang ; Tom Lendacky > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib > > > > Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 pa= tches are tested & acted by Gerd: > > Tested-by: Gerd Hoffmann > > Acked-by: Gerd Hoffmann > > > > For each one: listed as below, *so need Ray =E2=80=9Creviewed-by=E2=80=9D= tag on the patch: 05/06/14, need Gerd =E2=80=9Creviewed-by=E2=80=9D tag on= the patch: 08/09/10/11/12* > > > > [PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class > > Reviewed-by: Ray Ni --> no change compared to V3 > > > [PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib libr= ary instance > > Reviewed-by: Ray Ni --> no change compared to V3 > > > [PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables > > Reviewed-by: Ray Ni --> no change compared to V3 > > > [PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory = allocation > > Reviewed-by: Ray Ni --> no change compared to V3 > > > [PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global= variable > [PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuInd= ex > > * Change Based on Ray=E2=80=99s comment on V3: split the removal of CpuIn= dex parameter in a new patch, so add the 06 patch in V4.* > > > [PATCH v4 07/14] UefiCpuPkg/SmmRelocationLib: Add library instance for = AMD > > Reviewed-by: Abdul Lateef Attar --> no change= compared to V3 > > > [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVM= F > [PATCH v4 09/14] OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > [PATCH v4 10/14] OvmfPkg: Refine SmmAccess implementation > [PATCH v4 11/14] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is = done or not > [PATCH v4 12/14] OvmfPkg/PlatformPei: Relocate SmBases in PEI phase > > *Change Based on Gerd=E2=80=99s comment on V3: 1. Creating the EFI_SMM_S= MRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the co= mment in SmmAccess 3) refine the commit log.* > > > [PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocati= onLib > > Reviewed-by: Gua Guo > > Reviewed-by: Guo Dong > > > [PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation l= ogic > > *Change Based on Ray=E2=80=99s comment on V3: move the "TileSize" check j= ust below the original TileSize calculation logic* > > > > Thanks, > > Jiaxin > > > > From: Ni, Ray > Sent: Tuesday, April 30, 2024 2:01 PM > To: Wu, Jiaxin ; devel@edk2.groups.io > Cc: Zeng, Star ; Gerd Hoffmann ; = Kumar, Rahul R ; Dong, Guo ; R= hodes, Sean ; Lu, James ; Guo, G= ua ; Ard Biesheuvel ; Yao, Ji= ewen ; Abdul Lateef Attar = ; Abner Chang ; Tom Lendacky > Subject: Re: [PATCH v4 00/14] Add SmmRelocationLib > > > > Jiaxin, > > You need to add the missing Reviewed-by for each patch if the patch doesn= 't change in V4. > > > > Can you reply to this mail to list what patches have already got Reviewed= -by from whom? > > > > > > > > Thanks, > > Ray > > ________________________________ > > From: Wu, Jiaxin > Sent: Friday, April 26, 2024 20:17 > To: devel@edk2.groups.io > Cc: Ni, Ray ; Zeng, Star ; Gerd Ho= ffmann ; Kumar, Rahul R ; Dong,= Guo ; Rhodes, Sean ; Lu, James = ; Guo, Gua ; Ard Biesheuvel ; Yao, Jiewen ; Abdul Lateef Attar= ; Abner Chang ; Tom Lendac= ky > Subject: [PATCH v4 00/14] Add SmmRelocationLib > > > > PR: https://github.com/tianocore/edk2/pull/5546 > > 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. > > 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. > > 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. > > 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 > Cc: Abdul Lateef Attar > Cc: Abner Chang > Cc: Tom Lendacky > Signed-off-by: Jiaxin Wu > > Jiaxin Wu (14): > UefiCpuPkg: Add SmmRelocationLib class > UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance > UefiCpuPkg/SmmRelocationLib: Rename global variables > UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation > UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable > UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD > OvmfPkg/SmmRelocationLib: Add library instance for OVMF > OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > OvmfPkg: Refine SmmAccess implementation > OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not > OvmfPkg/PlatformPei: Relocate SmBases in PEI phase > UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib > UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic > > OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + > OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 135 +++-- > .../Library/PlatformInitLib/PlatformInitLib.inf | 6 +- > .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 33 +- > .../Library/SmmRelocationLib}/Ia32/Semaphore.c | 13 +- > .../Library/SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- > .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ > .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 +++++++++++++++= ++++++ > .../Library/SmmRelocationLib/SmmRelocationLib.inf | 60 +++ > .../SmmRelocationLib/SmramSaveStateConfig.c | 100 ++++ > .../Library/SmmRelocationLib}/X64/Semaphore.c | 13 +- > .../Library/SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- > OvmfPkg/Microvm/MicrovmX64.dsc | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/PlatformPei/Platform.c | 3 + > 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 | 116 ++--- > OvmfPkg/SmmAccess/SmmAccessPei.inf | 11 +- > OvmfPkg/SmmAccess/SmramInternal.c | 72 +-- > OvmfPkg/SmmAccess/SmramInternal.h | 19 +- > UefiCpuPkg/Include/Library/SmmRelocationLib.h | 42 ++ > .../SmmRelocationLib/AmdSmmRelocationLib.inf | 60 +++ > .../SmmRelocationLib/AmdSmramSaveStateConfig.c | 125 +++++ > .../SmmRelocationLib}/Ia32/Semaphore.c | 13 +- > .../SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- > .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ > .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 +++++++++++++++= ++++++ > .../Library/SmmRelocationLib/SmmRelocationLib.inf | 61 +++ > .../SmmRelocationLib/SmramSaveStateConfig.c | 136 +++++ > .../SmmRelocationLib}/X64/Semaphore.c | 13 +- > .../SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 21 +- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 334 ++----------- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 103 +--- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 4 - > UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h | 2 +- > UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 69 --- > UefiCpuPkg/UefiCpuPkg.dec | 3 + > UefiCpuPkg/UefiCpuPkg.dsc | 2 + > UefiPayloadPkg/UefiPayloadPkg.dsc | 2 + > 48 files changed, 2578 insertions(+), 796 deletions(-) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/I= a32/Semaphore.c (71%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/I= a32/SmmInit.nasm (47%) > create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocatio= nLib.h > create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.c > create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.inf > create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmramSaveStateConfig= .c > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/X= 64/Semaphore.c (78%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/X= 64/SmmInit.nasm (59%) > create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c > create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationL= ib.inf > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveState= Config.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/Ia32/Se= maphore.c (71%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/Ia32/Sm= mInit.nasm (47%) > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmReloca= tionLib.h > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.= c > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.= inf > create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateCon= fig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X64/Sem= aphore.c (78%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X64/Smm= Init.nasm (59%) > > -- > 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 (#118697): https://edk2.groups.io/g/devel/message/118697 Mute This Topic: https://groups.io/mt/105748911/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-