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 4107478003C for ; Mon, 26 Feb 2024 22:17:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=G9RjzqfTUwx+Dz9siIs+tz/RETG9kFFtmILy9B2R58Q=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:Reply-To:References:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708985851; v=1; b=Ol+98XCha+eAdmkg4sWUmz+R9ac2d8kXUfbHkmOSX8en7yGENv5GqeGupGgk6F5u7m8CzmuV SjEi7FXjxrEwzlZTqDGMaD3/JlfbmXqwxwGXA/VbUK44Y9rHCwCx0SdZS6qmiy78FwYGJ72GPt3 RgKHdo458li4YmrQqogZY77M= X-Received: by 127.0.0.2 with SMTP id 6l1ZYY7687511x1P0mda5qI8; Mon, 26 Feb 2024 14:17:31 -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.6841.1708985851106024391 for ; Mon, 26 Feb 2024 14:17:31 -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-588-e_ZhODx1ONqnqLzhShANdg-1; Mon, 26 Feb 2024 17:17:26 -0500 X-MC-Unique: e_ZhODx1ONqnqLzhShANdg-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 670DF88D127; Mon, 26 Feb 2024 22:17:26 +0000 (UTC) X-Received: from [10.39.194.99] (unknown [10.39.194.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4EEA911701C5; Mon, 26 Feb 2024 22:17:25 +0000 (UTC) Message-ID: <9765aed3-5adf-c8b0-8b35-d5e7d51b84e4@redhat.com> Date: Mon, 26 Feb 2024 23:17:23 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v3 0/6] UefiCpuPkg/MpInitLib: Add support for multiple MP_HAND_OFF HOBs From: "Laszlo Ersek" To: devel@edk2.groups.io, kraxel@redhat.com Cc: Ray Ni , Rahul Kumar , Oliver Steffen Reply-To: devel@edk2.groups.io,lersek@redhat.com References: <20240222160106.686484-1-kraxel@redhat.com> In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 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 List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 90htK0YOyIQOhhYwHFt3yirIx7686176AA= 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=Ol+98XCh; 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/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(-) >> >=20 > BTW, differences in PR#5410 relative to v3 as posted: >=20 > 1: 678ed78d24a3 ! 1: ecd6c4bb3396 UefiCpuPkg/MpInitLib: Add support for= multiple HOBs to GetMpHandOffHob > @@ Commit message >=20 > Signed-off-by: Gerd Hoffmann > Message-Id: <20240222160106.686484-2-kraxel@redhat.com> > + Reviewed-by: Ray Ni > + Reviewed-by: Laszlo Ersek >=20 > ## UefiCpuPkg/Library/MpInitLib/MpLib.h ## > @@ UefiCpuPkg/Library/MpInitLib/MpLib.h: SwitchApContext ( > 2: 23b3e66f9935 =3D 2: 189467980103 UefiCpuPkg/MpInitLib: Add support f= or multiple HOBs to GetBspNumber() > 3: e712d36775d0 =3D 3: 8ab0f63c0f04 UefiCpuPkg/MpInitLib: Add support f= or 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-kraxel@redhat.com> > + Reviewed-by: Laszlo Ersek >=20 > ## 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 >=20 > 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]] >=20 > ## 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 > 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_F= OUND)/ [Ray]] >=20 > ## 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; > } >=20 Merged as commit range 1f161a7915e1..d25421d0d8cd, via . Laszlo -=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 (#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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-