public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Ray Ni <ray.ni@intel.com>, Rahul Kumar <rahul1.kumar@intel.com>,
	Oliver Steffen <osteffen@redhat.com>
Subject: Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs
Date: Mon, 26 Feb 2024 23:17:23 +0100	[thread overview]
Message-ID: <9765aed3-5adf-c8b0-8b35-d5e7d51b84e4@redhat.com> (raw)
In-Reply-To: <bb592a9e-d195-466e-2865-109147a2bd8a@redhat.com>

On 2/26/24 16:19, Laszlo Ersek wrote:
> On 2/22/24 17:01, Gerd Hoffmann wrote:
>> Needed to boot guests with thousands of vcpus.
>>
>> v3:
>>  - refine comments and commit messages.
>>  - fix MaxCpusPerHob calculation.
>>  - pick up review tags.
>>  - add patch to speed up GetBspNumber a bit.
>> v2:
>>  - rework HOB loops for better performance: O(n) instead of O(n^2).
>>
>> Gerd Hoffmann (6):
>>   UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetMpHandOffHob
>>   UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetBspNumber()
>>   UefiCpuPkg/MpInitLib: Add support for multiple HOBs to
>>     SwitchApContext()
>>   UefiCpuPkg/MpInitLib: Add support for multiple HOBs to
>>     MpInitLibInitialize
>>   UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SaveCpuMpData()
>>   UefiCpuPkg/MpInitLib: return early in GetBspNumber()
>>
>>  UefiCpuPkg/Library/MpInitLib/MpLib.h    |  14 ++-
>>  UefiCpuPkg/Library/MpInitLib/MpLib.c    | 157 +++++++++++++++---------
>>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c |  44 ++++---
>>  3 files changed, 142 insertions(+), 73 deletions(-)
>>
> 
> BTW, differences in PR#5410 relative to v3 as posted:
> 
> 1:  678ed78d24a3 ! 1:  ecd6c4bb3396 UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetMpHandOffHob
>     @@ Commit message
> 
>          Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>          Message-Id: <20240222160106.686484-2-kraxel@redhat.com>
>     +    Reviewed-by: Ray Ni <ray.ni@intel.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
>       ## UefiCpuPkg/Library/MpInitLib/MpLib.h ##
>      @@ UefiCpuPkg/Library/MpInitLib/MpLib.h: SwitchApContext (
> 2:  23b3e66f9935 = 2:  189467980103 UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetBspNumber()
> 3:  e712d36775d0 = 3:  8ab0f63c0f04 UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SwitchApContext()
> 4:  9a81417f4b76 ! 4:  995a8ace7801 UefiCpuPkg/MpInitLib: Add support for multiple HOBs to MpInitLibInitialize
>     @@ Commit message
>          Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>          Reviewed-by: Ray Ni <ray.ni@intel.com>
>          Message-Id: <20240222160106.686484-5-kraxel@redhat.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
>       ## UefiCpuPkg/Library/MpInitLib/MpLib.c ##
>      @@ UefiCpuPkg/Library/MpInitLib/MpLib.c: MpInitLibInitialize (
> 5:  3a089b25725e ! 5:  f23c0d125e48 UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SaveCpuMpData()
>     @@ Commit message
> 
>          Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>          Message-Id: <20240222160106.686484-6-kraxel@redhat.com>
>     +    Reviewed-by: Ray Ni <ray.ni@intel.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>     +    [lersek@redhat.com: define one local variable per line [Ray]]
> 
>       ## UefiCpuPkg/Library/MpInitLib/PeiMpLib.c ##
>      @@ UefiCpuPkg/Library/MpInitLib/PeiMpLib.c: SaveCpuMpData (
>         IN CPU_MP_DATA  *CpuMpData
>         )
>       {
>     -+  UINT32           MaxCpusPerHob, CpusInHob;
>     ++  UINT32           MaxCpusPerHob;
>     ++  UINT32           CpusInHob;
>         UINT64           Data64;
>      -  UINTN            Index;
>     -+  UINT32           Index, HobBase;
>     ++  UINT32           Index;
>     ++  UINT32           HobBase;
>         CPU_INFO_IN_HOB  *CpuInfoInHob;
>         MP_HAND_OFF      *MpHandOff;
>         UINTN            MpHandOffSize;
> 6:  09435495e6e1 ! 6:  fbd8a114cd6e UefiCpuPkg/MpInitLib: return early in GetBspNumber()
>     @@ Commit message
>          Suggested-by: Laszlo Ersek <lersek@redhat.com>
>          Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>          Message-Id: <20240222160106.686484-7-kraxel@redhat.com>
>     +    Reviewed-by: Ray Ni <ray.ni@intel.com>
>     +    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>     +    [lersek@redhat.com: s/ASSERT (FALSE)/ASSERT_EFI_ERROR (EFI_NOT_FOUND)/ [Ray]]
> 
>       ## UefiCpuPkg/Library/MpInitLib/MpLib.c ##
>      @@ UefiCpuPkg/Library/MpInitLib/MpLib.c: GetBspNumber (
>     @@ UefiCpuPkg/Library/MpInitLib/MpLib.c: GetBspNumber (
>      -  ASSERT (BspNumber != MAX_UINT32);
>      -
>      -  return BspNumber;
>     -+  ASSERT (FALSE);
>     ++  ASSERT_EFI_ERROR (EFI_NOT_FOUND);
>      +  return 0;
>       }
> 

Merged as commit range 1f161a7915e1..d25421d0d8cd, via
<https://github.com/tianocore/edk2/pull/5410>.

Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115978): https://edk2.groups.io/g/devel/message/115978
Mute This Topic: https://groups.io/mt/104510905/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-02-26 22:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 16:01 [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs Gerd Hoffmann
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 1/6] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetMpHandOffHob Gerd Hoffmann
2024-02-23  2:35   ` Ni, Ray
2024-02-26 13:42     ` Laszlo Ersek
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 2/6] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to GetBspNumber() Gerd Hoffmann
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 3/6] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SwitchApContext() Gerd Hoffmann
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 4/6] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to MpInitLibInitialize Gerd Hoffmann
2024-02-26 13:51   ` Laszlo Ersek
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 5/6] UefiCpuPkg/MpInitLib: Add support for multiple HOBs to SaveCpuMpData() Gerd Hoffmann
2024-02-23  2:16   ` Ni, Ray
2024-02-26 13:55     ` Laszlo Ersek
2024-02-26 13:55   ` Laszlo Ersek
2024-02-22 16:01 ` [edk2-devel] [PATCH v3 6/6] UefiCpuPkg/MpInitLib: return early in GetBspNumber() Gerd Hoffmann
2024-02-23  2:33   ` Ni, Ray
2024-02-26 13:59     ` Laszlo Ersek
2024-02-26 14:01   ` Laszlo Ersek
2024-02-26 15:08 ` [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs Laszlo Ersek
2024-02-26 15:41   ` Joey Vagedes via groups.io
2024-02-26 16:01     ` Laszlo Ersek
2024-02-26 16:02     ` Laszlo Ersek
2024-02-26 15:19 ` Laszlo Ersek
2024-02-26 22:17   ` Laszlo Ersek [this message]
2024-02-27  6:28   ` Ni, Ray
2024-02-27 12:11     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9765aed3-5adf-c8b0-8b35-d5e7d51b84e4@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox