* [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
@ 2024-04-26 12:17 Wu, Jiaxin
2024-04-30 6:00 ` Ni, Ray
2024-04-30 9:58 ` Gerd Hoffmann
0 siblings, 2 replies; 10+ messages in thread
From: Wu, Jiaxin @ 2024-04-26 12:17 UTC (permalink / raw)
To: devel
Cc: Ray Ni, Zeng Star, Gerd Hoffmann, Rahul Kumar, Guo Dong,
Sean Rhodes, James Lu, Gua Guo, Ard Biesheuvel, Jiewen Yao,
Abdul Lateef Attar, Abner Chang, Tom Lendacky
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 <ray.ni@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118324): https://edk2.groups.io/g/devel/message/118324
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
[not found] <17C9D3A96ECC3791.6322@groups.io>
@ 2024-04-30 1:14 ` Wu, Jiaxin
0 siblings, 0 replies; 10+ messages in thread
From: Wu, Jiaxin @ 2024-04-30 1:14 UTC (permalink / raw)
To: Gerd Hoffmann, devel@edk2.groups.io, Wu, Jiaxin
Hi Gerd,
Could you help review & check below OVMF changes in v4:
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
Thanks,
Jiaxin
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wu,
> Jiaxin
> Sent: Friday, April 26, 2024 8:17 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>;
> Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>;
> Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen
> <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>;
> Abner Chang <abner.chang@amd.com>; Tom Lendacky
> <thomas.lendacky@amd.com>
> Subject: [edk2-devel] [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 <ray.ni@intel.com>
> Cc: Zeng Star <star.zeng@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Sean Rhodes <sean@starlabs.systems>
> Cc: James Lu <james.lu@intel.com>
> Cc: Gua Guo <gua.guo@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
>
> 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 =>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> copy {UefiCpuPkg/PiSmmCpuDxeSmm =>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> create mode 100644
> OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 =>
> OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> copy {UefiCpuPkg/PiSmmCpuDxeSmm =>
> OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
> 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 =>
> Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> rename UefiCpuPkg/{PiSmmCpuDxeSmm =>
> Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
> 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 =>
> Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> rename UefiCpuPkg/{PiSmmCpuDxeSmm =>
> Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
>
> --
> 2.16.2.windows.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118395): https://edk2.groups.io/g/devel/message/118395
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-04-26 12:17 Wu, Jiaxin
@ 2024-04-30 6:00 ` Ni, Ray
2024-04-30 10:14 ` Wu, Jiaxin
2024-05-07 3:39 ` Wu, Jiaxin
2024-04-30 9:58 ` Gerd Hoffmann
1 sibling, 2 replies; 10+ messages in thread
From: Ni, Ray @ 2024-04-30 6:00 UTC (permalink / raw)
To: Wu, Jiaxin, devel@edk2.groups.io
Cc: Zeng, Star, Gerd Hoffmann, Kumar, Rahul R, Dong, Guo,
Rhodes, Sean, Lu, James, Guo, Gua, Ard Biesheuvel, Yao, Jiewen,
Abdul Lateef Attar, Abner Chang, Tom Lendacky
[-- Attachment #1: Type: text/plain, Size: 8161 bytes --]
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 <jiaxin.wu@intel.com>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
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 <ray.ni@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118416): https://edk2.groups.io/g/devel/message/118416
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 15033 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-04-26 12:17 Wu, Jiaxin
2024-04-30 6:00 ` Ni, Ray
@ 2024-04-30 9:58 ` Gerd Hoffmann
1 sibling, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2024-04-30 9:58 UTC (permalink / raw)
To: Jiaxin Wu
Cc: devel, Ray Ni, Zeng Star, Rahul Kumar, Guo Dong, Sean Rhodes,
James Lu, Gua Guo, Ard Biesheuvel, Jiewen Yao, Abdul Lateef Attar,
Abner Chang, Tom Lendacky
On Fri, Apr 26, 2024 at 08:17:06PM GMT, Jiaxin Wu wrote:
> 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.
Series:
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118433): https://edk2.groups.io/g/devel/message/118433
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-04-30 6:00 ` Ni, Ray
@ 2024-04-30 10:14 ` Wu, Jiaxin
2024-05-07 3:39 ` Wu, Jiaxin
1 sibling, 0 replies; 10+ messages in thread
From: Wu, Jiaxin @ 2024-04-30 10:14 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io
Cc: Zeng, Star, Gerd Hoffmann, Kumar, Rahul R, Dong, Guo,
Rhodes, Sean, Lu, James, Guo, Gua, Ard Biesheuvel, Yao, Jiewen,
Abdul Lateef Attar, Abner Chang, Tom Lendacky
[-- Attachment #1: Type: text/plain, Size: 12160 bytes --]
Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches are tested & acted by Gerd:
Tested-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Acked-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
For each one: listed as below, *so need Ray "reviewed-by" tag on the patch: 05/06/14, need Gerd "reviewed-by" tag on the patch: 08/09/10/11/12*
[PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
[PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
* Change Based on Ray's comment on V3: split the removal of CpuIndex 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 <AbdulLateef.Attar@amd.com> --> no change compared to V3
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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's comment on V3: 1. Creating the EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the comment in SmmAccess 3) refine the commit log.*
[PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
Reviewed-by: Gua Guo <gua.guo@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
[PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic
*Change Based on Ray's comment on V3: move the "TileSize" check just below the original TileSize calculation logic*
Thanks,
Jiaxin
From: Ni, Ray <ray.ni@intel.com>
Sent: Tuesday, April 30, 2024 2:01 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.io
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
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 <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Zeng Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>
Cc: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
Cc: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
Cc: James Lu <james.lu@intel.com<mailto:james.lu@intel.com>>
Cc: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>
Cc: Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118434): https://edk2.groups.io/g/devel/message/118434
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 23979 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-04-30 6:00 ` Ni, Ray
2024-04-30 10:14 ` Wu, Jiaxin
@ 2024-05-07 3:39 ` Wu, Jiaxin
2024-05-07 4:59 ` Yao, Jiewen
1 sibling, 1 reply; 10+ messages in thread
From: Wu, Jiaxin @ 2024-05-07 3:39 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io, Ard Biesheuvel, Yao, Jiewen
Cc: Zeng, Star, Gerd Hoffmann, Kumar, Rahul R, Dong, Guo,
Rhodes, Sean, Lu, James, Guo, Gua, Abdul Lateef Attar,
Abner Chang, Tom Lendacky
[-- Attachment #1: Type: text/plain, Size: 13978 bytes --]
Hi Jiewen and Ard,
@Yao, Jiewen<mailto:jiewen.yao@intel.com>, @Ard Biesheuvel<mailto:ardb+tianocore@kernel.org>, do you agree we merge the change related to OVMF package since you are the OVMF maintainers. Please help check /review.
The patches have been acked/tested by the Gerd.
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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 <ray.ni@intel.com>; devel@edk2.groups.io
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches are tested & acted by Gerd:
Tested-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Acked-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
For each one: listed as below, *so need Ray "reviewed-by" tag on the patch: 05/06/14, need Gerd "reviewed-by" tag on the patch: 08/09/10/11/12*
[PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
[PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
* Change Based on Ray's comment on V3: split the removal of CpuIndex 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 <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>> --> no change compared to V3
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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's comment on V3: 1. Creating the EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the comment in SmmAccess 3) refine the commit log.*
[PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
Reviewed-by: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Reviewed-by: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
[PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic
*Change Based on Ray's comment on V3: move the "TileSize" check just below the original TileSize calculation logic*
Thanks,
Jiaxin
From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Tuesday, April 30, 2024 2:01 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Zeng Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>
Cc: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
Cc: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
Cc: James Lu <james.lu@intel.com<mailto:james.lu@intel.com>>
Cc: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>
Cc: Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118632): https://edk2.groups.io/g/devel/message/118632
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 27064 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-05-07 3:39 ` Wu, Jiaxin
@ 2024-05-07 4:59 ` Yao, Jiewen
2024-05-07 5:18 ` Wu, Jiaxin
0 siblings, 1 reply; 10+ messages in thread
From: Yao, Jiewen @ 2024-05-07 4:59 UTC (permalink / raw)
To: Wu, Jiaxin, Ni, Ray, devel@edk2.groups.io, Ard Biesheuvel
Cc: Zeng, Star, Gerd Hoffmann, Kumar, Rahul R, Dong, Guo,
Rhodes, Sean, Lu, James, Guo, Gua, Abdul Lateef Attar,
Abner Chang, Tom Lendacky
[-- Attachment #1: Type: text/plain, Size: 15067 bytes --]
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
From: Wu, Jiaxin <jiaxin.wu@intel.com>
Sent: Tuesday, May 7, 2024 11:39 AM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Hi Jiewen and Ard,
@Yao, Jiewen<mailto:jiewen.yao@intel.com>, @Ard Biesheuvel<mailto:ardb+tianocore@kernel.org>, do you agree we merge the change related to OVMF package since you are the OVMF maintainers. Please help check /review.
The patches have been acked/tested by the Gerd.
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches are tested & acted by Gerd:
Tested-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Acked-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
For each one: listed as below, *so need Ray "reviewed-by" tag on the patch: 05/06/14, need Gerd "reviewed-by" tag on the patch: 08/09/10/11/12*
[PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
[PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
* Change Based on Ray's comment on V3: split the removal of CpuIndex 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 <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>> --> no change compared to V3
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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's comment on V3: 1. Creating the EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the comment in SmmAccess 3) refine the commit log.*
[PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
Reviewed-by: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Reviewed-by: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
[PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic
*Change Based on Ray's comment on V3: move the "TileSize" check just below the original TileSize calculation logic*
Thanks,
Jiaxin
From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Tuesday, April 30, 2024 2:01 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Zeng Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>
Cc: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
Cc: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
Cc: James Lu <james.lu@intel.com<mailto:james.lu@intel.com>>
Cc: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>
Cc: Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118634): https://edk2.groups.io/g/devel/message/118634
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 28842 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-05-07 4:59 ` Yao, Jiewen
@ 2024-05-07 5:18 ` Wu, Jiaxin
2024-05-08 16:43 ` Ard Biesheuvel
0 siblings, 1 reply; 10+ messages in thread
From: Wu, Jiaxin @ 2024-05-07 5:18 UTC (permalink / raw)
To: Yao, Jiewen, Ni, Ray, devel@edk2.groups.io, Ard Biesheuvel
Cc: Zeng, Star, Gerd Hoffmann, Kumar, Rahul R, Dong, Guo,
Rhodes, Sean, Lu, James, Guo, Gua, Abdul Lateef Attar,
Abner Chang, Tom Lendacky
[-- Attachment #1: Type: text/plain, Size: 16188 bytes --]
Thanks Jiewen.
From: Yao, Jiewen <jiewen.yao@intel.com>
Sent: Tuesday, May 7, 2024 12:59 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Acked-by: Jiewen Yao <Jiewen.yao@intel.com<mailto:Jiewen.yao@intel.com>>
From: Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
Sent: Tuesday, May 7, 2024 11:39 AM
To: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Hi Jiewen and Ard,
@Yao, Jiewen<mailto:jiewen.yao@intel.com>, @Ard Biesheuvel<mailto:ardb+tianocore@kernel.org>, do you agree we merge the change related to OVMF package since you are the OVMF maintainers. Please help check /review.
The patches have been acked/tested by the Gerd.
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches are tested & acted by Gerd:
Tested-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Acked-by: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
For each one: listed as below, *so need Ray "reviewed-by" tag on the patch: 05/06/14, need Gerd "reviewed-by" tag on the patch: 08/09/10/11/12*
[PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>> --> no change compared to V3
[PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
[PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
* Change Based on Ray's comment on V3: split the removal of CpuIndex 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 <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>> --> no change compared to V3
[PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
[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's comment on V3: 1. Creating the EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the comment in SmmAccess 3) refine the commit log.*
[PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
Reviewed-by: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Reviewed-by: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
[PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic
*Change Based on Ray's comment on V3: move the "TileSize" check just below the original TileSize calculation logic*
Thanks,
Jiaxin
From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Tuesday, April 30, 2024 2:01 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Kumar, Rahul R <rahul.r.kumar@intel.com<mailto:rahul.r.kumar@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>; Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
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 <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Zeng Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
Cc: Rahul Kumar <rahul1.kumar@intel.com<mailto:rahul1.kumar@intel.com>>
Cc: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
Cc: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>>
Cc: James Lu <james.lu@intel.com<mailto:james.lu@intel.com>>
Cc: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: Abner Chang <abner.chang@amd.com<mailto:abner.chang@amd.com>>
Cc: Tom Lendacky <thomas.lendacky@amd.com<mailto:thomas.lendacky@amd.com>>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com<mailto:jiaxin.wu@intel.com>>
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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118635): https://edk2.groups.io/g/devel/message/118635
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 30747 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-05-07 5:18 ` Wu, Jiaxin
@ 2024-05-08 16:43 ` Ard Biesheuvel
2024-05-09 7:36 ` 回复: " gaoliming via groups.io
0 siblings, 1 reply; 10+ messages in thread
From: Ard Biesheuvel @ 2024-05-08 16:43 UTC (permalink / raw)
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
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 <jiaxin.wu@intel.com> wrote:
>
> Thanks Jiewen.
>
>
>
>
>
>
>
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Tuesday, May 7, 2024 12:59 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
>
>
>
> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
>
>
>
> From: Wu, Jiaxin <jiaxin.wu@intel.com>
> Sent: Tuesday, May 7, 2024 11:39 AM
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>
> Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
>
>
>
> Hi Jiewen and Ard,
>
>
>
> @Yao, Jiewen, @Ard Biesheuvel, do you agree we merge the change related to OVMF package since you are the OVMF maintainers. Please help check /review.
>
>
>
> The patches have been acked/tested by the Gerd.
>
>
>
> [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
> [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 <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
>
>
>
> Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches are tested & acted by Gerd:
>
> Tested-by: Gerd Hoffmann <kraxel@redhat.com>
>
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
>
>
>
> For each one: listed as below, *so need Ray “reviewed-by” tag on the patch: 05/06/14, need Gerd “reviewed-by” tag on the patch: 08/09/10/11/12*
>
>
>
> [PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
>
> Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
>
>
> [PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance
>
> Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
>
>
> [PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
>
> Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
>
>
> [PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
>
> Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
>
>
> [PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
> [PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
>
> * Change Based on Ray’s comment on V3: split the removal of CpuIndex 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 <AbdulLateef.Attar@amd.com> --> no change compared to V3
>
>
> [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for OVMF
> [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’s comment on V3: 1. Creating the EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function. 2) refine the comment in SmmAccess 3) refine the commit log.*
>
>
> [PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
>
> Reviewed-by: Gua Guo <gua.guo@intel.com>
>
> Reviewed-by: Guo Dong <guo.dong@intel.com>
>
>
> [PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic
>
> *Change Based on Ray’s comment on V3: move the "TileSize" check just below the original TileSize calculation logic*
>
>
>
> Thanks,
>
> Jiaxin
>
>
>
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Tuesday, April 30, 2024 2:01 PM
> To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.io
> Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> 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 <jiaxin.wu@intel.com>
> Sent: Friday, April 26, 2024 20:17
> To: devel@edk2.groups.io <devel@edk2.groups.io>
> Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> 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 <ray.ni@intel.com>
> Cc: Zeng Star <star.zeng@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Sean Rhodes <sean@starlabs.systems>
> Cc: James Lu <james.lu@intel.com>
> Cc: Gua Guo <gua.guo@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
>
> 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 => OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 => OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> copy {UefiCpuPkg/PiSmmCpuDxeSmm => OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
> 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 => Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
> 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 => Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> rename UefiCpuPkg/{PiSmmCpuDxeSmm => Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
>
> --
> 2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
2024-05-09 7:36 ` 回复: " gaoliming via groups.io
@ 2024-05-09 7:43 ` Ard Biesheuvel
0 siblings, 0 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2024-05-09 7:43 UTC (permalink / raw)
To: devel, gaoliming
Cc: Wu, Jiaxin, Yao, Jiewen, Ni, Ray, Zeng, Star, Gerd Hoffmann,
Kumar, Rahul R, Dong, Guo, Rhodes, Sean, Lu, James, Guo, Gua,
Abdul Lateef Attar, Abner Chang, Tom Lendacky
Thanks Liming.
On Thu, 9 May 2024 at 09:36, gaoliming via groups.io
<gaoliming=byosoft.com.cn@groups.io> wrote:
>
> Ard:
> Gerd is the reviewer of OvmfPkg. He gave Acked-by before soft feature freeze. So, this patch set can be merged for this stable tag 202405.
>
> And, this patch set has been merged.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ard Biesheuvel
> > 发送时间: 2024年5月9日 0:44
> > 收件人: Wu, Jiaxin <jiaxin.wu@intel.com>; Liming Gao (Byosoft address)
> > <gaoliming@byosoft.com.cn>
> > 抄送: Yao, Jiewen <jiewen.yao@intel.com>; Ni, Ray <ray.ni@intel.com>;
> > devel@edk2.groups.io; Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann
> > <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo
> > <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James
> > <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom
> > Lendacky <thomas.lendacky@amd.com>
> > 主题: Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib
> >
> > 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 <jiaxin.wu@intel.com> wrote:
> > >
> > > Thanks Jiewen.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > Sent: Tuesday, May 7, 2024 12:59 PM
> > > To: Wu, Jiaxin <jiaxin.wu@intel.com>; Ni, Ray <ray.ni@intel.com>;
> > devel@edk2.groups.io; Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> > Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>;
> > Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo,
> > Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>;
> > Abner Chang <abner.chang@amd.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>
> > > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
> > >
> > >
> > >
> > > Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
> > >
> > >
> > >
> > > From: Wu, Jiaxin <jiaxin.wu@intel.com>
> > > Sent: Tuesday, May 7, 2024 11:39 AM
> > > To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; Ard Biesheuvel
> > <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>
> > > Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> > Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>;
> > Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo,
> > Gua <gua.guo@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>;
> > Abner Chang <abner.chang@amd.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>
> > > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
> > >
> > >
> > >
> > > Hi Jiewen and Ard,
> > >
> > >
> > >
> > > @Yao, Jiewen, @Ard Biesheuvel, do you agree we merge the change related to
> > OVMF package since you are the OVMF maintainers. Please help check /review.
> > >
> > >
> > >
> > > The patches have been acked/tested by the Gerd.
> > >
> > >
> > >
> > > [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for
> > OVMF
> > > [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 <ray.ni@intel.com>; devel@edk2.groups.io
> > > Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> > Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>;
> > Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo,
> > Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao,
> > Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom
> > Lendacky <thomas.lendacky@amd.com>
> > > Subject: RE: [PATCH v4 00/14] Add SmmRelocationLib
> > >
> > >
> > >
> > > Thanks Ray, I missed to add some already reviewed-by tag in v4. All V4 patches
> > are tested & acted by Gerd:
> > >
> > > Tested-by: Gerd Hoffmann <kraxel@redhat.com>
> > >
> > > Acked-by: Gerd Hoffmann <kraxel@redhat.com>
> > >
> > >
> > >
> > > For each one: listed as below, *so need Ray “reviewed-by” tag on the patch:
> > 05/06/14, need Gerd “reviewed-by” tag on the patch: 08/09/10/11/12*
> > >
> > >
> > >
> > > [PATCH v4 01/14] UefiCpuPkg: Add SmmRelocationLib class
> > >
> > > Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
> > >
> > >
> > > [PATCH v4 02/14] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib
> > library instance
> > >
> > > Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
> > >
> > >
> > > [PATCH v4 03/14] UefiCpuPkg/SmmRelocationLib: Rename global variables
> > >
> > > Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
> > >
> > >
> > > [PATCH v4 04/14] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary
> > memory allocation
> > >
> > > Reviewed-by: Ray Ni <ray.ni@intel.com> --> no change compared to V3
> > >
> > >
> > > [PATCH v4 05/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary
> > global variable
> > > [PATCH v4 06/14] UefiCpuPkg/SmmRelocationLib: Remove unnecessary
> > CpuIndex
> > >
> > > * Change Based on Ray’s comment on V3: split the removal of CpuIndex
> > 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 <AbdulLateef.Attar@amd.com> --> no change
> > compared to V3
> > >
> > >
> > > [PATCH v4 08/14] OvmfPkg/SmmRelocationLib: Add library instance for
> > OVMF
> > > [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’s comment on V3: 1. Creating the
> > EFI_SMM_SMRAM_MEMORY_GUID HOB should be moved to its own function.
> > 2) refine the comment in SmmAccess 3) refine the commit log.*
> > >
> > >
> > > [PATCH v4 13/14] UefiPayloadPkg/UefiPayloadPkg.dsc: Include
> > SmmRelocationLib
> > >
> > > Reviewed-by: Gua Guo <gua.guo@intel.com>
> > >
> > > Reviewed-by: Guo Dong <guo.dong@intel.com>
> > >
> > >
> > > [PATCH v4 14/14] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases
> > relocation logic
> > >
> > > *Change Based on Ray’s comment on V3: move the "TileSize" check just below
> > the original TileSize calculation logic*
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Jiaxin
> > >
> > >
> > >
> > > From: Ni, Ray <ray.ni@intel.com>
> > > Sent: Tuesday, April 30, 2024 2:01 PM
> > > To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.io
> > > Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> > Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>;
> > Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo,
> > Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao,
> > Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom
> > Lendacky <thomas.lendacky@amd.com>
> > > 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 <jiaxin.wu@intel.com>
> > > Sent: Friday, April 26, 2024 20:17
> > > To: devel@edk2.groups.io <devel@edk2.groups.io>
> > > Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gerd
> > Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>;
> > Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu,
> > James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel
> > <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul
> > Lateef Attar <AbdulLateef.Attar@amd.com>; Abner Chang
> > <abner.chang@amd.com>; Tom Lendacky <thomas.lendacky@amd.com>
> > > 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 <ray.ni@intel.com>
> > > Cc: Zeng Star <star.zeng@intel.com>
> > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > Cc: Rahul Kumar <rahul1.kumar@intel.com>
> > > Cc: Guo Dong <guo.dong@intel.com>
> > > Cc: Sean Rhodes <sean@starlabs.systems>
> > > Cc: James Lu <james.lu@intel.com>
> > > Cc: Gua Guo <gua.guo@intel.com>
> > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > Cc: Abner Chang <abner.chang@amd.com>
> > > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > > Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> > >
> > > 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 =>
> > OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> > > copy {UefiCpuPkg/PiSmmCpuDxeSmm =>
> > OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> > > create mode 100644
> > OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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 =>
> > OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> > > copy {UefiCpuPkg/PiSmmCpuDxeSmm =>
> > OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
> > > 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 =>
> > Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
> > > rename UefiCpuPkg/{PiSmmCpuDxeSmm =>
> > Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
> > > create mode 100644
> > UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
> > > 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 =>
> > Library/SmmRelocationLib}/X64/Semaphore.c (78%)
> > > rename UefiCpuPkg/{PiSmmCpuDxeSmm =>
> > Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
> > >
> > > --
> > > 2.16.2.windows.1
> >
> >
> >
> >
>
>
>
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118748): https://edk2.groups.io/g/devel/message/118748
Mute This Topic: https://groups.io/mt/105997310/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-05-09 7:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <17C9D3A96ECC3791.6322@groups.io>
2024-04-30 1:14 ` [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib Wu, Jiaxin
2024-04-26 12:17 Wu, Jiaxin
2024-04-30 6:00 ` Ni, Ray
2024-04-30 10:14 ` Wu, Jiaxin
2024-05-07 3:39 ` Wu, Jiaxin
2024-05-07 4:59 ` Yao, Jiewen
2024-05-07 5:18 ` Wu, Jiaxin
2024-05-08 16:43 ` Ard Biesheuvel
2024-05-09 7:36 ` 回复: " gaoliming via groups.io
2024-05-09 7:43 ` Ard Biesheuvel
2024-04-30 9:58 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox