[edk2-devel] [PATCH 0/4] Revert the series of the patches which put APs in

Yuanhao Xie posted 4 patches 1 year, 3 months ago
Failed in applying to current master (apply log)
OvmfPkg/AmdSev/AmdSevX64.dsc                  |   3 +-
OvmfPkg/CloudHv/CloudHvX64.dsc                |   1 -
OvmfPkg/IntelTdx/IntelTdxX64.dsc              |   4 +-
OvmfPkg/Microvm/MicrovmX64.dsc                |   3 +-
OvmfPkg/OvmfPkgIa32X64.dsc                    |   1 -
OvmfPkg/OvmfPkgX64.dsc                        |   2 -
OvmfPkg/OvmfXen.dsc                           |   3 +-
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   7 +-
UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 128 +++++++------
.../Library/MpInitLib/Ia32/CreatePageTable.c  |  27 ---
UefiCpuPkg/Library/MpInitLib/MpEqu.inc        |   2 -
UefiCpuPkg/Library/MpInitLib/MpLib.h          |  46 +----
UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm  | 169 -----------------
.../Library/MpInitLib/X64/CreatePageTable.c   |  75 --------
UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 176 ++++++++++++++----
UefiCpuPkg/UefiCpuPkg.dsc                     |   1 -
UefiPayloadPkg/UefiPayloadPkg.dsc             |   1 -
17 files changed, 220 insertions(+), 429 deletions(-)
delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/CreatePageTable.c
delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c
[edk2-devel] [PATCH 0/4] Revert the series of the patches which put APs in
Posted by Yuanhao Xie 1 year, 3 months ago
This series of original patches requiring revert, redo and further cleanup.

4GB limitation of memory allocation will be kept for the case APs 
still need to be transferred to 32-bit mode before handoff to the OS.

Stack offset for AsmRelocateApLoopStart in 32-bit mode needs to be 
fixed up, as it is calculated taking into account the removed parameters.

The allocation size of the stack should be updated as the variant of 
APs loop function is introduced. 

Keep the logic that removes the XP attribute.

Since the commit 73ccde8f6d04 introduced CpuPageTableLib dependency which 
resolved for OvmfPkg and UefiPayloadPkg, it follows the revert order shown 
as below instead of the reverse order of original commits to ensure the tree 
buildable at every stage of the revert:

73ccde8f6d04 UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.
3f378450dfaf UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.
4a8642422460 OvmfPkg: Add CpuPageTableLib required by MpInitLib.
7bda8c648192 UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd

Yuanhao Xie (4):
  Revert "UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS."
  Revert "UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib."
  Revert "OvmfPkg: Add CpuPageTableLib required by MpInitLib."
  Revert "UefiCpuPkg: Duplicated AsmRelocateApLoop as
    AsmRelocateApLoopAmd"

 OvmfPkg/AmdSev/AmdSevX64.dsc                  |   3 +-
 OvmfPkg/CloudHv/CloudHvX64.dsc                |   1 -
 OvmfPkg/IntelTdx/IntelTdxX64.dsc              |   4 +-
 OvmfPkg/Microvm/MicrovmX64.dsc                |   3 +-
 OvmfPkg/OvmfPkgIa32X64.dsc                    |   1 -
 OvmfPkg/OvmfPkgX64.dsc                        |   2 -
 OvmfPkg/OvmfXen.dsc                           |   3 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   7 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 128 +++++++------
 .../Library/MpInitLib/Ia32/CreatePageTable.c  |  27 ---
 UefiCpuPkg/Library/MpInitLib/MpEqu.inc        |   2 -
 UefiCpuPkg/Library/MpInitLib/MpLib.h          |  46 +----
 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm  | 169 -----------------
 .../Library/MpInitLib/X64/CreatePageTable.c   |  75 --------
 UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 176 ++++++++++++++----
 UefiCpuPkg/UefiCpuPkg.dsc                     |   1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc             |   1 -
 17 files changed, 220 insertions(+), 429 deletions(-)
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/CreatePageTable.c
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c

-- 
2.36.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98163): https://edk2.groups.io/g/devel/message/98163
Mute This Topic: https://groups.io/mt/96145513/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] Revert the series of the patches which put APs in
Posted by Laszlo Ersek 1 year, 3 months ago
On 1/9/23 04:37, Yuanhao Xie wrote:
> This series of original patches requiring revert, redo and further cleanup.
> 
> 4GB limitation of memory allocation will be kept for the case APs 
> still need to be transferred to 32-bit mode before handoff to the OS.
> 
> Stack offset for AsmRelocateApLoopStart in 32-bit mode needs to be 
> fixed up, as it is calculated taking into account the removed parameters.
> 
> The allocation size of the stack should be updated as the variant of 
> APs loop function is introduced. 
> 
> Keep the logic that removes the XP attribute.
> 
> Since the commit 73ccde8f6d04 introduced CpuPageTableLib dependency which 
> resolved for OvmfPkg and UefiPayloadPkg, it follows the revert order shown 
> as below instead of the reverse order of original commits to ensure the tree 
> buildable at every stage of the revert:
> 
> 73ccde8f6d04 UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.
> 3f378450dfaf UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.
> 4a8642422460 OvmfPkg: Add CpuPageTableLib required by MpInitLib.
> 7bda8c648192 UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd
> 
> Yuanhao Xie (4):
>   Revert "UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS."
>   Revert "UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib."
>   Revert "OvmfPkg: Add CpuPageTableLib required by MpInitLib."
>   Revert "UefiCpuPkg: Duplicated AsmRelocateApLoop as
>     AsmRelocateApLoopAmd"
> 
>  OvmfPkg/AmdSev/AmdSevX64.dsc                  |   3 +-
>  OvmfPkg/CloudHv/CloudHvX64.dsc                |   1 -
>  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |   4 +-
>  OvmfPkg/Microvm/MicrovmX64.dsc                |   3 +-
>  OvmfPkg/OvmfPkgIa32X64.dsc                    |   1 -
>  OvmfPkg/OvmfPkgX64.dsc                        |   2 -
>  OvmfPkg/OvmfXen.dsc                           |   3 +-
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   7 +-
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 128 +++++++------
>  .../Library/MpInitLib/Ia32/CreatePageTable.c  |  27 ---
>  UefiCpuPkg/Library/MpInitLib/MpEqu.inc        |   2 -
>  UefiCpuPkg/Library/MpInitLib/MpLib.h          |  46 +----
>  UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm  | 169 -----------------
>  .../Library/MpInitLib/X64/CreatePageTable.c   |  75 --------
>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 176 ++++++++++++++----
>  UefiCpuPkg/UefiCpuPkg.dsc                     |   1 -
>  UefiPayloadPkg/UefiPayloadPkg.dsc             |   1 -
>  17 files changed, 220 insertions(+), 429 deletions(-)
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/CreatePageTable.c
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98174): https://edk2.groups.io/g/devel/message/98174
Mute This Topic: https://groups.io/mt/96145513/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] Revert the series of the patches which put APs in
Posted by Ard Biesheuvel 1 year, 3 months ago
On Mon, 9 Jan 2023 at 09:15, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 1/9/23 04:37, Yuanhao Xie wrote:
> > This series of original patches requiring revert, redo and further cleanup.
> >
> > 4GB limitation of memory allocation will be kept for the case APs
> > still need to be transferred to 32-bit mode before handoff to the OS.
> >
> > Stack offset for AsmRelocateApLoopStart in 32-bit mode needs to be
> > fixed up, as it is calculated taking into account the removed parameters.
> >
> > The allocation size of the stack should be updated as the variant of
> > APs loop function is introduced.
> >
> > Keep the logic that removes the XP attribute.
> >
> > Since the commit 73ccde8f6d04 introduced CpuPageTableLib dependency which
> > resolved for OvmfPkg and UefiPayloadPkg, it follows the revert order shown
> > as below instead of the reverse order of original commits to ensure the tree
> > buildable at every stage of the revert:
> >
> > 73ccde8f6d04 UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.
> > 3f378450dfaf UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.
> > 4a8642422460 OvmfPkg: Add CpuPageTableLib required by MpInitLib.
> > 7bda8c648192 UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd
> >
> > Yuanhao Xie (4):
> >   Revert "UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS."
> >   Revert "UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib."
> >   Revert "OvmfPkg: Add CpuPageTableLib required by MpInitLib."
> >   Revert "UefiCpuPkg: Duplicated AsmRelocateApLoop as
> >     AsmRelocateApLoopAmd"
> >
> >  OvmfPkg/AmdSev/AmdSevX64.dsc                  |   3 +-
> >  OvmfPkg/CloudHv/CloudHvX64.dsc                |   1 -
> >  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |   4 +-
> >  OvmfPkg/Microvm/MicrovmX64.dsc                |   3 +-
> >  OvmfPkg/OvmfPkgIa32X64.dsc                    |   1 -
> >  OvmfPkg/OvmfPkgX64.dsc                        |   2 -
> >  OvmfPkg/OvmfXen.dsc                           |   3 +-
> >  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   7 +-
> >  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       | 128 +++++++------
> >  .../Library/MpInitLib/Ia32/CreatePageTable.c  |  27 ---
> >  UefiCpuPkg/Library/MpInitLib/MpEqu.inc        |   2 -
> >  UefiCpuPkg/Library/MpInitLib/MpLib.h          |  46 +----
> >  UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm  | 169 -----------------
> >  .../Library/MpInitLib/X64/CreatePageTable.c   |  75 --------
> >  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 176 ++++++++++++++----
> >  UefiCpuPkg/UefiCpuPkg.dsc                     |   1 -
> >  UefiPayloadPkg/UefiPayloadPkg.dsc             |   1 -
> >  17 files changed, 220 insertions(+), 429 deletions(-)
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/CreatePageTable.c
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c
> >
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>

Series merged as #3873

Thanks all,


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98202): https://edk2.groups.io/g/devel/message/98202
Mute This Topic: https://groups.io/mt/96145513/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-