From nobody Mon Feb 9 01:16:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+72358+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+72358+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1614718149; cv=none; d=zohomail.com; s=zohoarc; b=l4xWFvAn4TW6XNvMopze5S9sS8HhHYJetnrMHdlopCELDh2OpLZJkgCG4aSlU4Nz1d2dfdcYqlb+wu/unInrGRsntcW9z6hUyhV0uMV5lKCn/iCCX0YWJ/Na6HoPQVkhefgwBWISWzVnZTWJLDxFs2nZnXiDQMEVFxp60pQ1vAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614718149; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=9JRmdnWqHJVWxYsjE+aqLIZryTFUPsMuHL8qSdYYoRw=; b=J7IZxBbhn21pIz/IkXAD3d/b1rCECMfkPghTCN/fFu+uDqpoB74NuRFr5jU1wWqelAlcg+cbGCfNzlsERQ873/pJLiY+G5tFGA3HKtzdoBm8giclBsnr1FvoZdj1dc8MqD71l3vGWDt3IjQPs6OCXOPcIdZJaAjxwOmANgrkqXw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+72358+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1614718149981804.2443553541718; Tue, 2 Mar 2021 12:49:09 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id sgzPYY1788612xQDbcGtQESS; Tue, 02 Mar 2021 12:49:09 -0800 X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web09.445.1614718137955573779 for ; Tue, 02 Mar 2021 12:48:57 -0800 X-Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 122Khg5x086245; Tue, 2 Mar 2021 15:48:55 -0500 X-Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 371vncg7y5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 15:48:55 -0500 X-Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 122KmN6S016543; Tue, 2 Mar 2021 20:48:53 GMT X-Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma05wdc.us.ibm.com with ESMTP id 371b00xpys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Mar 2021 20:48:53 +0000 X-Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 122Kmpqs27918626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Mar 2021 20:48:51 GMT X-Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AFE06C6057; Tue, 2 Mar 2021 20:48:51 +0000 (GMT) X-Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 268CBC6055; Tue, 2 Mar 2021 20:48:51 +0000 (GMT) X-Received: from amdrome1.watson.ibm.com (unknown [9.2.130.16]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 2 Mar 2021 20:48:51 +0000 (GMT) From: "Tobin Feldman-Fitzthum" To: devel@edk2.groups.io Cc: Dov Murik , Tobin Feldman-Fitzthum , Tobin Feldman-Fitzthum , James Bottomley , Hubertus Franke , Brijesh Singh , Ashish Kalra , Jon Grimm , Tom Lendacky Subject: [edk2-devel] [RFC PATCH 08/14] UefiCpuPkg/MpInitLib: temp removal of MpLib cleanup Date: Tue, 2 Mar 2021 15:48:33 -0500 Message-Id: <20210302204839.82042-9-tobin@linux.ibm.com> In-Reply-To: <20210302204839.82042-1-tobin@linux.ibm.com> References: <20210302204839.82042-1-tobin@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 Precedence: Bulk List-Unsubscribe: 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,tobin@linux.ibm.com X-Gm-Message-State: r0BRBbwuniAT05w78DcAAJNbx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1614718149; bh=HHlMXDKJoJaYC8CWYKKDyGhNH6PvO4uhLWlgbhP+gEo=; h=Cc:Date:From:Reply-To:Subject:To; b=v0LMRkX4SIURpWd6AU1klqKD+9xMmVvWrjXPRVJI4fCz6Nz+MqBa8bfLEOXU1jJYdiB FU0zTK65YXvssBPjb+X3sbxRWJGgmYfTmfMbMzSFATzrpUsx0ky1seXu39qJqmd3LYktJ Ba5GkYllWUlh2mmNj/jJY+iv9ultJJtUGa0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The Migration Handdler is started using the Mp Service, which is only designed to function during boot time. The MH needs to run continuously. In the abscence of a generalized persitent Mp Service, temporary alterations were made to keep the MH running. Here, we skip registering the ExitBootServices callback that would normally clean up the APs. Obviously this is not suitable for production, as it does not generalize for multiple APs (it leaves all APs untouched rather than just the MH) and it introduces a weird dependency where the MpLib needs an OVMF PCD. Signed-off-by: Tobin Feldman-Fitzthum --- UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 2 ++ UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf b/UefiCpuPkg/Lib= rary/MpInitLib/DxeMpInitLib.inf index 1771575c69..71cc968de8 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf @@ -39,6 +39,7 @@ MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec UefiCpuPkg/UefiCpuPkg.dec + OvmfPkg/OvmfPkg.dec =20 [LibraryClasses] BaseLib @@ -76,3 +77,4 @@ gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase ## = SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## = CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase ## = CONSUMES + gUefiOvmfPkgTokenSpaceGuid.PcdStartConfidentialMigrationHandler diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/M= pInitLib/DxeMpLib.c index 7839c24976..7d59ec4a92 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -569,14 +569,19 @@ InitMpGlobalData ( ); ASSERT_EFI_ERROR (Status); =20 - Status =3D gBS->CreateEvent ( - EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_CALLBACK, - MpInitChangeApLoopCallback, - NULL, - &mMpInitExitBootServicesEvent - ); - ASSERT_EFI_ERROR (Status); + // + // Workaround for persistent processes . + // + if (!PcdGetBool (PcdStartConfidentialMigrationHandler)) { + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_CALLBACK, + MpInitChangeApLoopCallback, + NULL, + &mMpInitExitBootServicesEvent + ); + ASSERT_EFI_ERROR (Status); + } =20 Status =3D gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, --=20 2.20.1 -=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 (#72358): https://edk2.groups.io/g/devel/message/72358 Mute This Topic: https://groups.io/mt/81036373/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-