[edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image

Min Xu posted 6 patches 1 year, 11 months ago
Failed in applying to current master (apply log)
OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
.../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
.../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27 +++++
.../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27 +++++
.../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23 ++++
.../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27 +++++
.../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
OvmfPkg/OvmfPkg.dec                           |   5 +
OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
OvmfPkg/OvmfPkgX64.fdf                        |   4 +
OvmfPkg/Sec/SecMain.c                         |  34 +++++-
OvmfPkg/Sec/SecMain.inf                       |   2 +
OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
22 files changed, 343 insertions(+), 314 deletions(-)
create mode 100644 OvmfPkg/Include/Ppi/MpInitLibDep.h
create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
[edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Min Xu 1 year, 11 months ago
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918

Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
scenario. This patch-set is to fix this issue.

As commit 88da06ca describes TDVF BSP and APs are simplied and it can
simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This
is done by setting different FILE_GUID to these drivers (of the same
name). In the other hand, we import a set of MpInitLibDepLib. These
libs simply depend on the PPI/Protocols. While these PPI/Protocols are
installed according to the guest type.

This patch-set is a replacement of
https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
 - https://edk2.groups.io/g/devel/message/89382
 - https://edk2.groups.io/g/devel/message/89455
 - https://edk2.groups.io/g/devel/message/89522
 - https://edk2.groups.io/g/devel/message/89535

The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2

v2 changes:
 - Remove the un-used FILE_GUID definitions.
 - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in DispatchTable.
 - Add more comments.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>

Min M Xu (4):
  UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
  OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
  OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
  OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers

Min Xu (2):
  OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
  OvmfPkg: Add MpInitLibDepLib

 OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
 .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
 OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
 OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
 .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27 +++++
 .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27 +++++
 .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23 ++++
 .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27 +++++
 .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
 OvmfPkg/OvmfPkg.dec                           |   5 +
 OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
 OvmfPkg/OvmfPkgX64.fdf                        |   4 +
 OvmfPkg/Sec/SecMain.c                         |  34 +++++-
 OvmfPkg/Sec/SecMain.inf                       |   2 +
 OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
 OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
 UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
 22 files changed, 343 insertions(+), 314 deletions(-)
 create mode 100644 OvmfPkg/Include/Ppi/MpInitLibDep.h
 create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c

-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89562): https://edk2.groups.io/g/devel/message/89562
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Min Xu 1 year, 11 months ago
Gerd & Tom
What are your comments about this patch-set?

> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Saturday, May 7, 2022 9:36 AM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni,
> Ray <ray.ni@intel.com>; Brijesh Singh <brijesh.singh@amd.com>; Aktas,
> Erdem <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> 
> Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
> scenario. This patch-set is to fix this issue.
> 
> As commit 88da06ca describes TDVF BSP and APs are simplied and it can
> simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
> include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This is
> done by setting different FILE_GUID to these drivers (of the same name). In
> the other hand, we import a set of MpInitLibDepLib. These libs simply
> depend on the PPI/Protocols. While these PPI/Protocols are installed
> according to the guest type.
> 
> This patch-set is a replacement of
> https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
>  - https://edk2.groups.io/g/devel/message/89382
>  - https://edk2.groups.io/g/devel/message/89455
>  - https://edk2.groups.io/g/devel/message/89522
>  - https://edk2.groups.io/g/devel/message/89535
> 
> The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2
> 
> v2 changes:
>  - Remove the un-used FILE_GUID definitions.
>  - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in
> DispatchTable.
>  - Add more comments.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Brijesh Singh <brijesh.singh@amd.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> 
> Min M Xu (4):
>   UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
>   OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
>   OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
>   OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers
> 
> Min Xu (2):
>   OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
>   OvmfPkg: Add MpInitLibDepLib
> 
>  OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
>  .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
>  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
>  OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
>  .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27
> +++++  .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27
> +++++  .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23
> ++++  .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27
> +++++  .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
>  OvmfPkg/OvmfPkg.dec                           |   5 +
>  OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
>  OvmfPkg/OvmfPkgX64.fdf                        |   4 +
>  OvmfPkg/Sec/SecMain.c                         |  34 +++++-
>  OvmfPkg/Sec/SecMain.inf                       |   2 +
>  OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
>  OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
>  UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
>  UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
>  UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
>  UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
>  22 files changed, 343 insertions(+), 314 deletions(-)  create mode 100644
> OvmfPkg/Include/Ppi/MpInitLibDep.h
>  create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
>  create mode 100644
> OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
>  create mode 100644
> OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
>  create mode 100644
> OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
>  create mode 100644
> OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
> 
> --
> 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89614): https://edk2.groups.io/g/devel/message/89614
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Yao, Jiewen 1 year, 11 months ago
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Monday, May 9, 2022 8:45 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Brijesh Singh
> <brijesh.singh@amd.com>; Aktas, Erdem <erdemaktas@google.com>; James
> Bottomley <jejb@linux.ibm.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tom
> Lendacky <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: RE: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> 
> Gerd & Tom
> What are your comments about this patch-set?
> 
> > -----Original Message-----
> > From: Xu, Min M <min.m.xu@intel.com>
> > Sent: Saturday, May 7, 2022 9:36 AM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M <min.m.xu@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni,
> > Ray <ray.ni@intel.com>; Brijesh Singh <brijesh.singh@amd.com>; Aktas,
> > Erdem <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>;
> > Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> > Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> >
> > Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
> > scenario. This patch-set is to fix this issue.
> >
> > As commit 88da06ca describes TDVF BSP and APs are simplied and it can
> > simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
> > include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This is
> > done by setting different FILE_GUID to these drivers (of the same name). In
> > the other hand, we import a set of MpInitLibDepLib. These libs simply
> > depend on the PPI/Protocols. While these PPI/Protocols are installed
> > according to the guest type.
> >
> > This patch-set is a replacement of
> > https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
> >  - https://edk2.groups.io/g/devel/message/89382
> >  - https://edk2.groups.io/g/devel/message/89455
> >  - https://edk2.groups.io/g/devel/message/89522
> >  - https://edk2.groups.io/g/devel/message/89535
> >
> > The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2
> >
> > v2 changes:
> >  - Remove the un-used FILE_GUID definitions.
> >  - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in
> > DispatchTable.
> >  - Add more comments.
> >
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Brijesh Singh <brijesh.singh@amd.com>
> > Cc: Erdem Aktas <erdemaktas@google.com>
> > Cc: James Bottomley <jejb@linux.ibm.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Min Xu <min.m.xu@intel.com>
> >
> > Min M Xu (4):
> >   UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
> >   OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
> >   OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
> >   OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers
> >
> > Min Xu (2):
> >   OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
> >   OvmfPkg: Add MpInitLibDepLib
> >
> >  OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
> >  .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
> >  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
> >  OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
> >  .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27
> > +++++  .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27
> > +++++  .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23
> > ++++  .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27
> > +++++  .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
> >  OvmfPkg/OvmfPkg.dec                           |   5 +
> >  OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
> >  OvmfPkg/OvmfPkgX64.fdf                        |   4 +
> >  OvmfPkg/Sec/SecMain.c                         |  34 +++++-
> >  OvmfPkg/Sec/SecMain.inf                       |   2 +
> >  OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
> >  OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
> >  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
> >  UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
> >  UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
> >  UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
> >  UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
> >  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
> >  22 files changed, 343 insertions(+), 314 deletions(-)  create mode 100644
> > OvmfPkg/Include/Ppi/MpInitLibDep.h
> >  create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
> >  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
> >
> > --
> > 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89679): https://edk2.groups.io/g/devel/message/89679
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Yao, Jiewen 1 year, 11 months ago
Merged https://github.com/tianocore/edk2/pull/2877



> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Monday, May 9, 2022 8:45 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Brijesh Singh
> <brijesh.singh@amd.com>; Aktas, Erdem <erdemaktas@google.com>; James
> Bottomley <jejb@linux.ibm.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tom
> Lendacky <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: RE: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> 
> Gerd & Tom
> What are your comments about this patch-set?
> 
> > -----Original Message-----
> > From: Xu, Min M <min.m.xu@intel.com>
> > Sent: Saturday, May 7, 2022 9:36 AM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M <min.m.xu@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni,
> > Ray <ray.ni@intel.com>; Brijesh Singh <brijesh.singh@amd.com>; Aktas,
> > Erdem <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>;
> > Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> > Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> >
> > Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
> > scenario. This patch-set is to fix this issue.
> >
> > As commit 88da06ca describes TDVF BSP and APs are simplied and it can
> > simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
> > include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This is
> > done by setting different FILE_GUID to these drivers (of the same name). In
> > the other hand, we import a set of MpInitLibDepLib. These libs simply
> > depend on the PPI/Protocols. While these PPI/Protocols are installed
> > according to the guest type.
> >
> > This patch-set is a replacement of
> > https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
> >  - https://edk2.groups.io/g/devel/message/89382
> >  - https://edk2.groups.io/g/devel/message/89455
> >  - https://edk2.groups.io/g/devel/message/89522
> >  - https://edk2.groups.io/g/devel/message/89535
> >
> > The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2
> >
> > v2 changes:
> >  - Remove the un-used FILE_GUID definitions.
> >  - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in
> > DispatchTable.
> >  - Add more comments.
> >
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Brijesh Singh <brijesh.singh@amd.com>
> > Cc: Erdem Aktas <erdemaktas@google.com>
> > Cc: James Bottomley <jejb@linux.ibm.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Min Xu <min.m.xu@intel.com>
> >
> > Min M Xu (4):
> >   UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
> >   OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
> >   OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
> >   OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers
> >
> > Min Xu (2):
> >   OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
> >   OvmfPkg: Add MpInitLibDepLib
> >
> >  OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
> >  .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
> >  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
> >  OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
> >  .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27
> > +++++  .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27
> > +++++  .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23
> > ++++  .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27
> > +++++  .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
> >  OvmfPkg/OvmfPkg.dec                           |   5 +
> >  OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
> >  OvmfPkg/OvmfPkgX64.fdf                        |   4 +
> >  OvmfPkg/Sec/SecMain.c                         |  34 +++++-
> >  OvmfPkg/Sec/SecMain.inf                       |   2 +
> >  OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
> >  OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
> >  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
> >  UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
> >  UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
> >  UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
> >  UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
> >  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
> >  22 files changed, 343 insertions(+), 314 deletions(-)  create mode 100644
> > OvmfPkg/Include/Ppi/MpInitLibDep.h
> >  create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
> >  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
> >  create mode 100644
> > OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
> >  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
> >
> > --
> > 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89680): https://edk2.groups.io/g/devel/message/89680
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Gerd Hoffmann 1 year, 11 months ago
On Mon, May 09, 2022 at 12:44:58PM +0000, Xu, Min M wrote:
> Gerd & Tom
> What are your comments about this patch-set?
> 
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> > 
> > Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
> > scenario. This patch-set is to fix this issue.
> > 
> > As commit 88da06ca describes TDVF BSP and APs are simplied and it can
> > simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
> > include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This is
> > done by setting different FILE_GUID to these drivers (of the same name). In
> > the other hand, we import a set of MpInitLibDepLib. These libs simply
> > depend on the PPI/Protocols. While these PPI/Protocols are installed
> > according to the guest type.

So the idea is to pick the one or the other implementations via guid
and depex dependencies?  The approach looks sane to me.

Assuming the above is correct:
Acked-by: Gerd Hoffmann <kraxel@redhat.com>

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89650): https://edk2.groups.io/g/devel/message/89650
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Min Xu 1 year, 11 months ago
On May 10, 2022 5:27 PM, Gerd Hoffmann wrote:
> On Mon, May 09, 2022 at 12:44:58PM +0000, Xu, Min M wrote:
> > Gerd & Tom
> > What are your comments about this patch-set?
> >
> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> > >
> > > Above BZ reports an issue that commit 88da06ca triggers ASSERT in
> > > some scenario. This patch-set is to fix this issue.
> > >
> > > As commit 88da06ca describes TDVF BSP and APs are simplied and it
> > > can simply use MpInitLibUp instead of MpInitLib. To achieve this
> > > goal, we include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and
> > > IntelTdxX64. This is done by setting different FILE_GUID to these
> > > drivers (of the same name). In the other hand, we import a set of
> > > MpInitLibDepLib. These libs simply depend on the PPI/Protocols.
> > > While these PPI/Protocols are installed according to the guest type.
> 
> So the idea is to pick the one or the other implementations via guid and
> depex dependencies?  The approach looks sane to me.
Yes, it is the idea. In this way we can decouple the Tdx guest from MpInitLib (multi-processor version) in current stage.
 
Thanks
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89671): https://edk2.groups.io/g/devel/message/89671
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Lendacky, Thomas via groups.io 1 year, 11 months ago
On 5/9/22 07:44, Xu, Min M wrote:
> Gerd & Tom
> What are your comments about this patch-set?

Hi Min,

This appears to resolve the issue. I was able to boot a 64 vCPU guest in 
legacy, SEV, SEV-ES and SEV-SNP modes without any asserts.

I'm assuming that you were able to see the ASSERTs on your end and 
validate, too?

Thanks,
Tom

> 
>> -----Original Message-----
>> From: Xu, Min M <min.m.xu@intel.com>
>> Sent: Saturday, May 7, 2022 9:36 AM
>> To: devel@edk2.groups.io
>> Cc: Xu, Min M <min.m.xu@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni,
>> Ray <ray.ni@intel.com>; Brijesh Singh <brijesh.singh@amd.com>; Aktas,
>> Erdem <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>;
>> Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
>> <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
>> Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
>>
>> Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
>> scenario. This patch-set is to fix this issue.
>>
>> As commit 88da06ca describes TDVF BSP and APs are simplied and it can
>> simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
>> include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This is
>> done by setting different FILE_GUID to these drivers (of the same name). In
>> the other hand, we import a set of MpInitLibDepLib. These libs simply
>> depend on the PPI/Protocols. While these PPI/Protocols are installed
>> according to the guest type.
>>
>> This patch-set is a replacement of
>> https://edk2.groups.io/g/devel/message/89381
>>   - https://edk2.groups.io/g/devel/message/89382
>>   - https://edk2.groups.io/g/devel/message/89455
>>   - https://edk2.groups.io/g/devel/message/89522
>>   - https://edk2.groups.io/g/devel/message/89535
>>
>> The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2
>>
>> v2 changes:
>>   - Remove the un-used FILE_GUID definitions.
>>   - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in
>> DispatchTable.
>>   - Add more comments.
>>
>> Cc: Eric Dong <eric.dong@intel.com>
>> Cc: Ray Ni <ray.ni@intel.com>
>> Cc: Brijesh Singh <brijesh.singh@amd.com>
>> Cc: Erdem Aktas <erdemaktas@google.com>
>> Cc: James Bottomley <jejb@linux.ibm.com>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Tom Lendacky <thomas.lendacky@amd.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Signed-off-by: Min Xu <min.m.xu@intel.com>
>>
>> Min M Xu (4):
>>    UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
>>    OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
>>    OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
>>    OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers
>>
>> Min Xu (2):
>>    OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
>>    OvmfPkg: Add MpInitLibDepLib
>>
>>   OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
>>   .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
>>   OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
>>   OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
>>   .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27
>> +++++  .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27
>> +++++  .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23
>> ++++  .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27
>> +++++  .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
>>   OvmfPkg/OvmfPkg.dec                           |   5 +
>>   OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
>>   OvmfPkg/OvmfPkgX64.fdf                        |   4 +
>>   OvmfPkg/Sec/SecMain.c                         |  34 +++++-
>>   OvmfPkg/Sec/SecMain.inf                       |   2 +
>>   OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
>>   OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
>>   UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
>>   UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
>>   UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
>>   UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
>>   UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
>>   UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
>>   22 files changed, 343 insertions(+), 314 deletions(-)  create mode 100644
>> OvmfPkg/Include/Ppi/MpInitLibDep.h
>>   create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
>>   create mode 100644
>> OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
>>   create mode 100644
>> OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
>>   create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
>>   create mode 100644
>> OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
>>   create mode 100644
>> OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
>>   delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
>>   delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
>>   delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
>>
>> --
>> 2.29.2.windows.2
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89620): https://edk2.groups.io/g/devel/message/89620
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Min Xu 1 year, 11 months ago
On May 10, 2022 1:30 AM, Tom Lendacky wrote:
> 
> On 5/9/22 07:44, Xu, Min M wrote:
> > Gerd & Tom
> > What are your comments about this patch-set?
> 
> Hi Min,
> 
> This appears to resolve the issue. I was able to boot a 64 vCPU guest in
> legacy, SEV, SEV-ES and SEV-SNP modes without any asserts.
> 
> I'm assuming that you were able to see the ASSERTs on your end and
> validate, too?
> 
Yes. I enable a 4 vCPU legacy guest and can see the ASSERTs. But it appears in a random rate so it missed in the CI.

Thanks
Min


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


Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Lendacky, Thomas via groups.io 1 year, 11 months ago

On 5/9/22 18:37, Xu, Min M wrote:
> On May 10, 2022 1:30 AM, Tom Lendacky wrote:
>>
>> On 5/9/22 07:44, Xu, Min M wrote:
>>> Gerd & Tom
>>> What are your comments about this patch-set?
>>
>> Hi Min,
>>
>> This appears to resolve the issue. I was able to boot a 64 vCPU guest in
>> legacy, SEV, SEV-ES and SEV-SNP modes without any asserts.
>>
>> I'm assuming that you were able to see the ASSERTs on your end and
>> validate, too?
>>
> Yes. I enable a 4 vCPU legacy guest and can see the ASSERTs. But it appears in a random rate so it missed in the CI.

Hmmm... I hadn't noticed it before, but I'm seeing the following message
from the Linux kernel for each AP being brought online:

APIC: Stale IRR: 00000000,00000000,00000000,00000000,00000000,00000000,00000001,00000000 ISR: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000

Let me investigate this further to see where this regression was
introduced.

Thanks,
Tom

> 
> Thanks
> Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89666): https://edk2.groups.io/g/devel/message/89666
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Lendacky, Thomas via groups.io 1 year, 11 months ago
On 5/9/22 18:37, Xu, Min M wrote:
> On May 10, 2022 1:30 AM, Tom Lendacky wrote:
>>
>> On 5/9/22 07:44, Xu, Min M wrote:
>>> Gerd & Tom
>>> What are your comments about this patch-set?
>>
>> Hi Min,
>>
>> This appears to resolve the issue. I was able to boot a 64 vCPU guest in
>> legacy, SEV, SEV-ES and SEV-SNP modes without any asserts.
>>
>> I'm assuming that you were able to see the ASSERTs on your end and
>> validate, too?
>>
> Yes. I enable a 4 vCPU legacy guest and can see the ASSERTs. But it appears in a random rate so it missed in the CI.

Yeah, with a low number of vCPUs, the crashes were random. When I upped 
the count to 64 vCPUs that could all run in parallel (running on an EPYC 
server box) it happened on (almost) every boot.

But glad that you were able to observe it and create this fix.

Thanks, Min!

Tom

> 
> Thanks
> Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89661): https://edk2.groups.io/g/devel/message/89661
Mute This Topic: https://groups.io/mt/90946714/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
Posted by Ni, Ray 1 year, 11 months ago
Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Saturday, May 7, 2022 9:36 AM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Brijesh Singh
> <brijesh.singh@amd.com>; Aktas, Erdem <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Tom Lendacky <thomas.lendacky@amd.com>; Gerd Hoffmann <kraxel@redhat.com>
> Subject: [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918
> 
> Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
> scenario. This patch-set is to fix this issue.
> 
> As commit 88da06ca describes TDVF BSP and APs are simplied and it can
> simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
> include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This
> is done by setting different FILE_GUID to these drivers (of the same
> name). In the other hand, we import a set of MpInitLibDepLib. These
> libs simply depend on the PPI/Protocols. While these PPI/Protocols are
> installed according to the guest type.
> 
> This patch-set is a replacement of
> https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
>  - https://edk2.groups.io/g/devel/message/89382
>  - https://edk2.groups.io/g/devel/message/89455
>  - https://edk2.groups.io/g/devel/message/89522
>  - https://edk2.groups.io/g/devel/message/89535
> 
> The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib.v2
> 
> v2 changes:
>  - Remove the un-used FILE_GUID definitions.
>  - Delete un-used EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST in DispatchTable.
>  - Add more comments.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Brijesh Singh <brijesh.singh@amd.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> 
> Min M Xu (4):
>   UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
>   OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
>   OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
>   OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers
> 
> Min Xu (2):
>   OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
>   OvmfPkg: Add MpInitLibDepLib
> 
>  OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
>  .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
>  OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  30 ++++-
>  OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   3 +
>  .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27 +++++
>  .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27 +++++
>  .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23 ++++
>  .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27 +++++
>  .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
>  OvmfPkg/OvmfPkg.dec                           |   5 +
>  OvmfPkg/OvmfPkgX64.dsc                        |  55 ++++++++-
>  OvmfPkg/OvmfPkgX64.fdf                        |   4 +
>  OvmfPkg/Sec/SecMain.c                         |  34 +++++-
>  OvmfPkg/Sec/SecMain.inf                       |   2 +
>  OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
>  OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
>  UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
>  UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
>  UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
>  UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
>  22 files changed, 343 insertions(+), 314 deletions(-)
>  create mode 100644 OvmfPkg/Include/Ppi/MpInitLibDep.h
>  create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
>  create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
>  delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c
> 
> --
> 2.29.2.windows.2



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