From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 81D96AC0F0E for ; Mon, 26 Feb 2024 15:19:51 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BOAoOV/bKlWEZ9SxixfVk+fOvW6IqiaLjrb2eESNRy4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708960790; v=1; b=q+7KMq05D1in8e9/o/nz/OvHqsTgKHeTs1XZsli27hf6bcDLTQ8I5RZLfp+CSN8W4DpvsuAq H0JO+myKhte2iXZ0Wk2bwPHrsnEIBi9yIEuJnH9/tR7rhXcdB4dT5vcfR0cN28Mmxb5YoEOHY+m WV7IsK2O+NE6v4+56O1i+npI= X-Received: by 127.0.0.2 with SMTP id o8aMYY7687511xRUkDdSnoBM; Mon, 26 Feb 2024 07:19:50 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.22710.1708960789554635602 for ; Mon, 26 Feb 2024 07:19:49 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-q_Tk1DjSO62McQYAvKtbJw-1; Mon, 26 Feb 2024 10:19:45 -0500 X-MC-Unique: q_Tk1DjSO62McQYAvKtbJw-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DA9F881C87; Mon, 26 Feb 2024 15:19:45 +0000 (UTC) X-Received: from [10.39.194.99] (unknown [10.39.194.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1198C492BC6; Mon, 26 Feb 2024 15:19:43 +0000 (UTC) Message-ID: Date: Mon, 26 Feb 2024 16:19:42 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs To: devel@edk2.groups.io, kraxel@redhat.com Cc: Ray Ni , Rahul Kumar , Oliver Steffen References: <20240222160106.686484-1-kraxel@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20240222160106.686484-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: SVmYlRv0qGoz4JtaYaaycJQnx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=q+7KMq05; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 m= ultiple HOBs to GetMpHandOffHob @@ Commit message Signed-off-by: Gerd Hoffmann Message-Id: <20240222160106.686484-2-kraxel@redhat.com> + Reviewed-by: Ray Ni + Reviewed-by: Laszlo Ersek ## UefiCpuPkg/Library/MpInitLib/MpLib.h ## @@ UefiCpuPkg/Library/MpInitLib/MpLib.h: SwitchApContext ( 2: 23b3e66f9935 =3D 2: 189467980103 UefiCpuPkg/MpInitLib: Add support for= multiple HOBs to GetBspNumber() 3: e712d36775d0 =3D 3: 8ab0f63c0f04 UefiCpuPkg/MpInitLib: Add support for= multiple HOBs to SwitchApContext() 4: 9a81417f4b76 ! 4: 995a8ace7801 UefiCpuPkg/MpInitLib: Add support for m= ultiple HOBs to MpInitLibInitialize @@ Commit message Signed-off-by: Gerd Hoffmann Reviewed-by: Ray Ni Message-Id: <20240222160106.686484-5-kraxel@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 m= ultiple HOBs to SaveCpuMpData() @@ Commit message Signed-off-by: Gerd Hoffmann Message-Id: <20240222160106.686484-6-kraxel@redhat.com> + Reviewed-by: Ray Ni + Reviewed-by: Laszlo Ersek + [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 G= etBspNumber() @@ Commit message Suggested-by: Laszlo Ersek Signed-off-by: Gerd Hoffmann Message-Id: <20240222160106.686484-7-kraxel@redhat.com> + Reviewed-by: Ray Ni + Reviewed-by: Laszlo Ersek + [lersek@redhat.com: s/ASSERT (FALSE)/ASSERT_EFI_ERROR (EFI_NOT_FOU= ND)/ [Ray]] ## UefiCpuPkg/Library/MpInitLib/MpLib.c ## @@ UefiCpuPkg/Library/MpInitLib/MpLib.c: GetBspNumber ( @@ UefiCpuPkg/Library/MpInitLib/MpLib.c: GetBspNumber ( - ASSERT (BspNumber !=3D MAX_UINT32); - - return BspNumber; -+ ASSERT (FALSE); ++ ASSERT_EFI_ERROR (EFI_NOT_FOUND); + return 0; } -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-