public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] support CPU hot-unplug
@ 2020-12-08  5:34 ankur.a.arora
  2020-12-08  5:34 ` [RFC PATCH 1/5] OvmfPkg/CpuHotplugSmm: move CPU Hotplug into PlugCpus() Ankur Arora
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: ankur.a.arora @ 2020-12-08  5:34 UTC (permalink / raw)
  To: devel; +Cc: imammedo, lersek, boris.ostrovsky, Ankur Arora

[ Resending to the correct edk2 alias this time. ]

Hi,

This series adds support for CPU hot-unplug with OVMF.

Please see this in conjunction with the QEMU v2 series posted here: 
  https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imammedo@redhat.com/

In particular, would be glad for comments on Patch 4, specifically
where we should be ejecting the CPU. 

Right now the ejection happens in UnplugCpus() (called from
CpuHotplugMmi()):
  +    QemuCpuhpWriteCpuSelector (mMmCpuIo, RemoveApicId);
  +    QemuCpuhpWriteCpuStatus (mMmCpuIo, QEMU_CPUHP_STAT_EJECTED);

That is way too early -- given that the actual unplug will happen
in SmmCpuUpdate() and given that the BSPHandler() would have waited
for the APs multiple times before then.

Another possibility is that the actual ejection be deferred to the
_EJ0 method after the return from the SMI. But, that seems like a
hack. Additionally, Igor points out here that this approach has problems:
  https://lore.kernel.org/qemu-devel/20201204170939.1815522-1-imammedo@redhat.com/

Please review.

Thanks
Ankur

Ankur Arora (5):
  OvmfPkg/CpuHotplugSmm: move CPU Hotplug into PlugCpus()
  OvmfPkg/CpuHotplugSmm: handle fw_remove
  OvmfPkg/CpuHotplugSmm: add CpuStatus helper function
  OvmfPkg/CpuHotplugSmm: handle CPU hot-unplug
  OvmfPkg/SmmControl2Dxe: negotiate ICH9_LPC_SMI_F_CPU_HOT_UNPLUG

 OvmfPkg/CpuHotplugSmm/CpuHotplug.c            | 293 ++++++++++++------
 OvmfPkg/CpuHotplugSmm/QemuCpuhp.c             |  58 +++-
 OvmfPkg/CpuHotplugSmm/QemuCpuhp.h             |   6 +
 .../Include/IndustryStandard/QemuCpuHotplug.h |   2 +
 OvmfPkg/SmmControl2Dxe/SmiFeatures.c          |  21 +-
 5 files changed, 280 insertions(+), 100 deletions(-)

-- 
2.25.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-12-21 19:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-08  5:34 [RFC PATCH 0/5] support CPU hot-unplug ankur.a.arora
2020-12-08  5:34 ` [RFC PATCH 1/5] OvmfPkg/CpuHotplugSmm: move CPU Hotplug into PlugCpus() Ankur Arora
2020-12-08  5:34 ` [RFC PATCH 2/5] OvmfPkg/CpuHotplugSmm: handle fw_remove Ankur Arora
2020-12-08  5:34 ` [RFC PATCH 3/5] OvmfPkg/CpuHotplugSmm: add CpuStatus helper function Ankur Arora
2020-12-08  5:34 ` [RFC PATCH 4/5] OvmfPkg/CpuHotplugSmm: handle CPU hot-unplug Ankur Arora
2020-12-08  5:34 ` [RFC PATCH 5/5] OvmfPkg/SmmControl2Dxe: negotiate ICH9_LPC_SMI_F_CPU_HOT_UNPLUG Ankur Arora
2020-12-10  9:21 ` [RFC PATCH 0/5] support CPU hot-unplug Laszlo Ersek
2020-12-10 20:08   ` Ankur Arora
2020-12-11 16:21     ` [edk2-devel] " Igor Mammedov
2020-12-21 14:44 ` Laszlo Ersek
2020-12-21 15:03   ` Laszlo Ersek
2020-12-21 15:46   ` Igor Mammedov
2020-12-21 19:57     ` Laszlo Ersek
2020-12-21 19:09   ` Ankur Arora
2020-12-21 19:58     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox