diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c index d50416302677..5af78211d343 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 BSP is done */ + while (mCpuHotEjectData->Handler != NULL) { + CpuPause (); + } + return; }