From 215c7fe762d54bc2c7e7813cc745125b710b0835 Mon Sep 17 00:00:00 2001 From: Andy Lau Date: Thu, 7 Nov 2024 10:27:12 +0800 Subject: [PATCH] makes sure all APs stay in SMM mode until the CPU hot-unplug operation is complete hot-unplug operation is complete --- ...s-stay-in-SMM-mode-until-the-CPU-hot.patch | 29 +++++++++++++++++++ edk2.spec | 7 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 0053-make-sure-all-APs-stay-in-SMM-mode-until-the-CPU-hot.patch diff --git a/0053-make-sure-all-APs-stay-in-SMM-mode-until-the-CPU-hot.patch b/0053-make-sure-all-APs-stay-in-SMM-mode-until-the-CPU-hot.patch new file mode 100755 index 0000000..5d53138 --- /dev/null +++ b/0053-make-sure-all-APs-stay-in-SMM-mode-until-the-CPU-hot.patch @@ -0,0 +1,29 @@ +From cc3ba89124c4e33fd2bdb74cf19716cdede221c7 Mon Sep 17 00:00:00 2001 +From: Andy lau +Date: Thu, 7 Nov 2024 09:46:07 +0800 +Subject: [PATCH] make sure all APs stay in SMM mode until the CPU hot-unplug + operation is complete + +--- + OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c +index d504163..54fa840 100644 +--- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c ++++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c +@@ -355,6 +355,11 @@ EjectCpu ( + // + QemuSelector = mCpuHotEjectData->QemuSelectorMap[ProcessorNum]; + if (QemuSelector == CPU_EJECT_QEMU_SELECTOR_INVALID) { ++ /*wait until the BSP has completed the register updates*/ ++ while (mCpuHotEjectData->Handler != NULL) { ++ CpuPause (); ++ } ++ + return; + } + +-- +2.43.0 + diff --git a/edk2.spec b/edk2.spec index 8b97367..b3d25d4 100644 --- a/edk2.spec +++ b/edk2.spec @@ -7,7 +7,7 @@ Name: edk2 Version: %{stable_date} -Release: 12 +Release: 13 Summary: EFI Development Kit II License: BSD-2-Clause-Patent and OpenSSL and MIT URL: https://github.com/tianocore/edk2 @@ -85,6 +85,7 @@ patch50: 0050-MdePkg-Fix-overflow-issue-in-BasePeCoffLib.patch # Fix CVE-2023-45236、CVE-2023-45237 patch51: 0051-NetworkPkg-SECURITY-PATCH-CVE-2023-45237.patch patch52: 0052-NetworkPkg-TcpDxe-SECURITY-PATCH-CVE-2023-45236.patch +patch53: 0053-make-sure-all-APs-stay-in-SMM-mode-until-the-CPU-hot.patch BuildRequires: acpica-tools gcc gcc-c++ libuuid-devel python3 bc nasm python3-unversioned-command isl @@ -324,6 +325,10 @@ chmod +x %{buildroot}%{_bindir}/Rsa2048Sha256GenerateKeys %endif %changelog +* Thu Nov 7 2024 andy - 202308-13 +- to ensure that all APs are in SMM mode before the CPU hot-unplug operation is complete, +- let APs wait until the BSP has completed the register updates to remove the CPU. + * Mon Oct 14 2024 shenyage - 202308-12 - fix CVE-2023-45236、CVE-2023-45237 -- Gitee