From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.66469.1673252140715401280 for ; Mon, 09 Jan 2023 00:15:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SPL5KVta; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673252139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AuvLdffk+DOZzJtd0MVVGPHaTp6AskEG1PM5X4pQgSo=; b=SPL5KVtaIpeLKdRttlwQGwTy2mAZBERHDx6YI8vlavh2asMb7abpuKtXzmicQqSH7iIiMS Dh+qZ1aoMSeR9epjN542YB6HMwyq0W1Z/guwVrDM4Yn0cpltkxz+PNV9GI+BvodRmXF+Ag vXpsscX9KiyOI5eD6ZqW35URRbjrXSs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-43-zzRE3xlOPYygXCahXMJ1Eg-1; Mon, 09 Jan 2023 03:15:38 -0500 X-MC-Unique: zzRE3xlOPYygXCahXMJ1Eg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8821385CCE0; Mon, 9 Jan 2023 08:15:36 +0000 (UTC) Received: from [10.39.192.220] (unknown [10.39.192.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 14AE3492C14; Mon, 9 Jan 2023 08:15:35 +0000 (UTC) Message-ID: Date: Mon, 9 Jan 2023 09:15:34 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH 0/4] Revert the series of the patches which put APs in To: devel@edk2.groups.io, yuanhao.xie@intel.com References: <20230109033724.1130-1-yuanhao.xie@intel.com> From: "Laszlo Ersek" In-Reply-To: <20230109033724.1130-1-yuanhao.xie@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/9/23 04:37, Yuanhao Xie wrote: > This series of original patches requiring revert, redo and further cleanup. > > 4GB limitation of memory allocation will be kept for the case APs > still need to be transferred to 32-bit mode before handoff to the OS. > > Stack offset for AsmRelocateApLoopStart in 32-bit mode needs to be > fixed up, as it is calculated taking into account the removed parameters. > > The allocation size of the stack should be updated as the variant of > APs loop function is introduced. > > Keep the logic that removes the XP attribute. > > Since the commit 73ccde8f6d04 introduced CpuPageTableLib dependency which > resolved for OvmfPkg and UefiPayloadPkg, it follows the revert order shown > as below instead of the reverse order of original commits to ensure the tree > buildable at every stage of the revert: > > 73ccde8f6d04 UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS. > 3f378450dfaf UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib. > 4a8642422460 OvmfPkg: Add CpuPageTableLib required by MpInitLib. > 7bda8c648192 UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd > > Yuanhao Xie (4): > Revert "UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS." > Revert "UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib." > Revert "OvmfPkg: Add CpuPageTableLib required by MpInitLib." > Revert "UefiCpuPkg: Duplicated AsmRelocateApLoop as > AsmRelocateApLoopAmd" > > OvmfPkg/AmdSev/AmdSevX64.dsc | 3 +- > OvmfPkg/CloudHv/CloudHvX64.dsc | 1 - > OvmfPkg/IntelTdx/IntelTdxX64.dsc | 4 +- > OvmfPkg/Microvm/MicrovmX64.dsc | 3 +- > OvmfPkg/OvmfPkgIa32X64.dsc | 1 - > OvmfPkg/OvmfPkgX64.dsc | 2 - > OvmfPkg/OvmfXen.dsc | 3 +- > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 7 +- > UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 128 +++++++------ > .../Library/MpInitLib/Ia32/CreatePageTable.c | 27 --- > UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 - > UefiCpuPkg/Library/MpInitLib/MpLib.h | 46 +---- > UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm | 169 ----------------- > .../Library/MpInitLib/X64/CreatePageTable.c | 75 -------- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 176 ++++++++++++++---- > UefiCpuPkg/UefiCpuPkg.dsc | 1 - > UefiPayloadPkg/UefiPayloadPkg.dsc | 1 - > 17 files changed, 220 insertions(+), 429 deletions(-) > delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/CreatePageTable.c > delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/CreatePageTable.c > Reviewed-by: Laszlo Ersek