Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-27 Thread Laszlo Ersek
On 2/27/24 07:28, Ni, Ray wrote:
> Thank you, Laszlo!
> The changes you made look good to me.
> 
> By the way, is the following a common way to call out additional changes?
>> +[ler...@redhat.com: define one local variable per line [Ray]]

I don't know of any other project that uses it.

I must have seen Jordan a decade ago (?) use this way for marking
last-minute maintainer changes, and I've been following the pattern since.

I think it's preferable to silently editing a patch; after all, the
contributor did not verbatim post the patch that's about to be merged.

Laszlo

> 
> Thanks,
> Ray
>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of Laszlo
>> Ersek
>> Sent: Monday, February 26, 2024 11:20 PM
>> To: devel@edk2.groups.io; kra...@redhat.com
>> Cc: Ni, Ray ; Kumar, Rahul R ;
>> Oliver Steffen 
>> Subject: Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support
>> for multiple MP_HAND_OFF HOBs
>>
>> 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 
>>  Message-Id: <20240222160106.686484-2-kra...@redhat.com>
>> +Reviewed-by: Ray Ni 
>> +Reviewed-by: Laszlo Ersek 
>>
>>   ## 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 
>>  Reviewed-by: Ray Ni 
>>  Message-Id: <20240222160106.686484-5-kra...@redhat.com>
>> +Reviewed-by: Laszlo Ersek 
>>
>>   ## 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 
>>  Message-Id: <20240222160106.686484-6-kra...@redhat.com>
>> +Reviewed-by: Ray Ni 
>> +Reviewed-by: Laszlo Ersek 
>> +[ler...@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;
>>  -  UINTNIndex;
>> -+  UINT32   Index, HobBase;
>> ++  UINT32   Index;
>> ++  UINT32   HobBase;
>> CPU_INFO_IN_HOB  *CpuInfoInHob;
>> MP_HAND_OFF  *MpHandOff;
>> UINTNMpHandOffSize;
>> 6:  09435495e6e1 ! 6:  fb

Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Ni, Ray
Thank you, Laszlo!
The changes you made look good to me.

By the way, is the following a common way to call out additional changes?
> +[ler...@redhat.com: define one local variable per line [Ray]]

Thanks,
Ray
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Laszlo
> Ersek
> Sent: Monday, February 26, 2024 11:20 PM
> To: devel@edk2.groups.io; kra...@redhat.com
> Cc: Ni, Ray ; Kumar, Rahul R ;
> Oliver Steffen 
> Subject: Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support
> for multiple MP_HAND_OFF HOBs
> 
> 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 
>  Message-Id: <20240222160106.686484-2-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> 
>   ## 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 
>  Reviewed-by: Ray Ni 
>  Message-Id: <20240222160106.686484-5-kra...@redhat.com>
> +Reviewed-by: Laszlo Ersek 
> 
>   ## 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 
>  Message-Id: <20240222160106.686484-6-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> +[ler...@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;
>  -  UINTNIndex;
> -+  UINT32   Index, HobBase;
> ++  UINT32   Index;
> ++  UINT32   HobBase;
> CPU_INFO_IN_HOB  *CpuInfoInHob;
> MP_HAND_OFF  *MpHandOff;
> UINTNMpHandOffSize;
> 6:  09435495e6e1 ! 6:  fbd8a114cd6e UefiCpuPkg/MpInitLib: return early
> in GetBspNumber()
> @@ Commit message
>  Suggested-by: Laszlo Ersek 
>  Signed-off-by: Gerd Hoffmann 
>  Message-Id: <20240222160106.686484-7-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> +[ler...@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;
>   }
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116002): https://edk2.groups.io/g/devel/message/116002
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Laszlo Ersek
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 
>  Message-Id: <20240222160106.686484-2-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> 
>   ## 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 
>  Reviewed-by: Ray Ni 
>  Message-Id: <20240222160106.686484-5-kra...@redhat.com>
> +Reviewed-by: Laszlo Ersek 
> 
>   ## 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 
>  Message-Id: <20240222160106.686484-6-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> +[ler...@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;
>  -  UINTNIndex;
> -+  UINT32   Index, HobBase;
> ++  UINT32   Index;
> ++  UINT32   HobBase;
> CPU_INFO_IN_HOB  *CpuInfoInHob;
> MP_HAND_OFF  *MpHandOff;
> UINTNMpHandOffSize;
> 6:  09435495e6e1 ! 6:  fbd8a114cd6e UefiCpuPkg/MpInitLib: return early in 
> GetBspNumber()
> @@ Commit message
>  Suggested-by: Laszlo Ersek 
>  Signed-off-by: Gerd Hoffmann 
>  Message-Id: <20240222160106.686484-7-kra...@redhat.com>
> +Reviewed-by: Ray Ni 
> +Reviewed-by: Laszlo Ersek 
> +[ler...@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
.

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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Laszlo Ersek
Hi Joey,
On 2/26/24 16:41, Joey Vagedes wrote:
> Hi Lazlo,
> 
> I just looked at the pipelines - Looks like everything is fine, there is just 
> currently a backup of runners of jobs in the runners. It is common for jobs 
> that end in CODE_COVERAGE to appear frozen in queued status, but this is 
> expected as this job not queued until all others have finished, which means 
> it gets put at the end of the list of pipelines to execute.
> 
> Taking a look at all the runners 
> (https://dev.azure.com/tianocore/edk2-ci/_settings/buildqueue?_a=concurrentJobs
>  [Click "Microsoft Hosted", "View in-progress jobs"]), I don't see any 
> runners that are frozen, which is why it appears it's just a backup.
> 
> I'll continue to monitor.

thanks -- meanwhile I've also found the blockage, just from a different
perspective.

I've known for a while that it is not ideal to have multiple PRs open at
the same time with the "push" label set. They will either compete for
resources (slow), or one will block the other ("queued" state); however,
the main annoyance is that once the first PR gets merged, the HEAD of
the master branch will move for all the other PRs, and then those PRs
will fail to merge even if their CIs run to completion. So in such
cases, the maintainer needs to notice the problem in the first place
(possibly after having waited for 30+ minutes), then perform a manual
rebase (using the github web UI or a local rebase + force push), and
then pray that their next attempt will get to the front of the queue.

It would be much better if:

- *either* the "preempted" PRs rebased themselves automatically to the
new master HEAD, and restarted the CI + merge train,

- *or*, if at least one PR with "push" were in progress at the time of
the maintainer creating a new PR with "push", the CI run wouldn't even
*start* -- instead, the maintainer would *immediately* get information
about being blocked (and about the inevitable need to rebase later, once
that "other" -- earlier-filed -- PR completes).

Now, I've been trying to implement strategy#2 myself, by checking the
"open PRs" view (with an eye towards the "push" label among those PRs)
just before submitting a PR myself. I did that this time as well, but
didn't see any concurrent push-PR. That's why I was confused -- first I
didn't understand what blocked my CI tasks, and then I didn't understand
what had preempted (= de-synced) my PR. When I fetched locally afresh, I
found two new commits, but didn't understand where those had come from,
given that I couldn't see any push-PR concurrently to mine.

*However*, searching my edk2-devel folder for the subjects of those
suddenly appearing new commits, I figured out the problem: PR
 was created in *December*
last year, but Liming set the "push" label on it only ~2 hours ago. In
other words, PR#5187 was the one to hold up and preempt mine. So, why
did I not see it in the "open PRs" view? (Because, as I wrote above, if
I had seen it, I wouldn't have submitted mine in the first place -- I'd
have known it would be useless, due to the master branch moving forward
anyway!)

Well the reason I didn't see PR#5187 (donning the "push" label at that)
was that PR#5187 had been *old as heck*, and so it simply didn't make
the first page of the "open PRs" listing! I didn't expect two months old
PRs to be merged.

So, my lesson from this is: it's not the plain "open PRs" view that I
need to check, when implementing approach #2 myself. Instead, I have to
explicitly search for open PRs with the "push" label:

https://github.com/tianocore/edk2/labels/push

Thanks!
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115973): https://edk2.groups.io/g/devel/message/115973
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Laszlo Ersek
On 2/26/24 16:41, Joey Vagedes via groups.io wrote:

> Taking a look at all the runners
> (https://dev.azure.com/tianocore/edk2-ci/_settings/buildqueue?_a=concurrentJobs
> [Click "Microsoft Hosted", "View in-progress jobs"]), I don't see any
> runners that are frozen, which is why it appears it's just a backup.

... unfortunately this URL seems to require a Microsoft account; it's
not publicly accessible.

Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115974): https://edk2.groups.io/g/devel/message/115974
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Joey Vagedes via groups.io
Hi Lazlo,

I just looked at the pipelines - Looks like everything is fine, there is just 
currently a backup of runners of jobs in the runners. It is common for jobs 
that end in CODE_COVERAGE to appear frozen in queued status, but this is 
expected as this job not queued until all others have finished, which means it 
gets put at the end of the list of pipelines to execute.

Taking a look at all the runners 
(https://dev.azure.com/tianocore/edk2-ci/_settings/buildqueue?_a=concurrentJobs 
[Click "Microsoft Hosted", "View in-progress jobs"]), I don't see any runners 
that are frozen, which is why it appears it's just a backup.

I'll continue to monitor.

Thanks,
Joey

-Original Message-
From: Laszlo Ersek 
Sent: Monday, February 26, 2024 7:08 AM
To: devel@edk2.groups.io; kra...@redhat.com
Cc: Ni, Ray ; Rahul Kumar ; Oliver 
Steffen ; Kinney, Michael D ; 
Sean Brogan ; Joey Vagedes 

Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add 
support for multiple MP_HAND_OFF HOBs

[You don't often get email from ler...@redhat.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

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(-)

I created PR <https://github.com/tianocore/edk2/pull/5410> with the "push" 
label set 40 minutes ago, for merging this series; however, the CI system seems 
to be stuck. Everything on Azure seems to be in Queued status, nothing is 
running.

Any ideas?

Thanks!
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115972): https://edk2.groups.io/g/devel/message/115972
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Laszlo Ersek
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 
 Message-Id: <20240222160106.686484-2-kra...@redhat.com>
+Reviewed-by: Ray Ni 
+Reviewed-by: Laszlo Ersek 

  ## 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 
 Reviewed-by: Ray Ni 
 Message-Id: <20240222160106.686484-5-kra...@redhat.com>
+Reviewed-by: Laszlo Ersek 

  ## 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 
 Message-Id: <20240222160106.686484-6-kra...@redhat.com>
+Reviewed-by: Ray Ni 
+Reviewed-by: Laszlo Ersek 
+[ler...@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;
 -  UINTNIndex;
-+  UINT32   Index, HobBase;
++  UINT32   Index;
++  UINT32   HobBase;
CPU_INFO_IN_HOB  *CpuInfoInHob;
MP_HAND_OFF  *MpHandOff;
UINTNMpHandOffSize;
6:  09435495e6e1 ! 6:  fbd8a114cd6e UefiCpuPkg/MpInitLib: return early in 
GetBspNumber()
@@ Commit message
 Suggested-by: Laszlo Ersek 
 Signed-off-by: Gerd Hoffmann 
 Message-Id: <20240222160106.686484-7-kra...@redhat.com>
+Reviewed-by: Ray Ni 
+Reviewed-by: Laszlo Ersek 
+[ler...@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;
  }



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115969): https://edk2.groups.io/g/devel/message/115969
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-26 Thread Laszlo Ersek
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(-)

I created PR  with the
"push" label set 40 minutes ago, for merging this series; however, the
CI system seems to be stuck. Everything on Azure seems to be in Queued
status, nothing is running.

Any ideas?

Thanks!
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115967): https://edk2.groups.io/g/devel/message/115967
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs

2024-02-22 Thread Gerd Hoffmann
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(-)

-- 
2.43.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115826): https://edk2.groups.io/g/devel/message/115826
Mute This Topic: https://groups.io/mt/104510905/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-