On 01/26/21 07:44, Ankur Arora wrote: > Hi, > > This series adds support for CPU hot-unplug with OVMF. > > Please see this in conjunction with the QEMU secureboot hot-unplug v2 > series posted here (now upstreamed): > > https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imamm...@redhat.com/ > > Patches 1 and 3, > ("OvmfPkg/CpuHotplugSmm: refactor hotplug logic") > ("OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper") > are either refactors or add support functions. > > OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() > OvmfPkg/CpuHotplugSmm: add CpuEject() > OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection > > Patch 2 and 9, > ("OvmfPkg/CpuHotplugSmm: collect hot-unplug events") > ("OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug") > handle the QEMU protocol logic for collection of CPU hot-unplug events > or the protocol negotiation. > > Patch 4, > ("OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()") > adds the MMI logic for CPU hot-unplug handling and informing > the PiSmmCpuDxeSmm of CPU removal. > > Patches 5 and 6, > ("OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA") > ("OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state") > sets up state for doing the CPU ejection as part of hot-unplug. > > Patches 7, and 8, > ("OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()") > ("OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection") > add the CPU ejection logic. > > Testing (with QEMU 5.2.50): > - Stable with randomized CPU plug/unplug (guest maxcpus=1,8,128) > - Synthetic tests with simultaneous multi CPU hot-unplug > - Negotiation with/without CPU hotplug enabled > > Also at: > github.com/terminus/edk2/ hot-unplug-v5 > > Changelog: > v5: > - fixes ECC errors (all but one in "OvmfPkg/CpuHotplugSmm: add > add Qemu Cpu Status helper"). > > v4: > - Gets rid of unnecessary UefiCpuPkg changes > URL: > https://patchew.org/EDK2/20210118063457.358581-1-ankur.a.ar...@oracle.com/ > > v3: > - Use a saner PCD based interface to share state between PiSmmCpuDxeSmm > and OvmfPkg/CpuHotplugSmm > - Cleaner split of the hot-unplug code > URL: > https://patchew.org/EDK2/20210115074533.277448-1-ankur.a.ar...@oracle.com/ > > v2: > - Do the ejection via SmmCpuFeaturesRendezvousExit() > URL: > https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.ar...@oracle.com/ > > RFC: > URL: > https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.ar...@oracle.com/ > > > Please review. > > Thanks > Ankur > > Ankur Arora (9): > OvmfPkg/CpuHotplugSmm: refactor hotplug logic > OvmfPkg/CpuHotplugSmm: collect hot-unplug events > OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper > OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() > OvmfPkg/CpuHotplugSmm: define CPU_HOT_EJECT_DATA > OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state > OvmfPkg/CpuHotplugSmm: add CpuEject() > OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection > OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug > > OvmfPkg/OvmfPkg.dec | 10 + > OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 1 + > .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 3 + > OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 + > OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h | 2 + > OvmfPkg/Include/Library/CpuHotEjectData.h | 32 ++ > OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 450 > ++++++++++++++++----- > OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 57 ++- > .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 68 ++++ > OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 25 +- > 10 files changed, 552 insertions(+), 102 deletions(-) > create mode 100644 OvmfPkg/Include/Library/CpuHotEjectData.h >
Comparing the maximum line lengths for each file modified, before and after the series: - before: 73 OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf 78 OvmfPkg/CpuHotplugSmm/QemuCpuhp.h 79 OvmfPkg/CpuHotplugSmm/CpuHotplug.c 79 OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf 79 OvmfPkg/CpuHotplugSmm/QemuCpuhp.c 79 OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 79 OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 79 OvmfPkg/SmmControl2Dxe/SmiFeatures.c 120 OvmfPkg/OvmfPkg.dec 120 total - after: 73 OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf 78 OvmfPkg/CpuHotplugSmm/QemuCpuhp.h 79 OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf 79 OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h 79 OvmfPkg/SmmControl2Dxe/SmiFeatures.c 85 OvmfPkg/CpuHotplugSmm/QemuCpuhp.c 90 OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 91 OvmfPkg/Include/Library/CpuHotEjectData.h 97 OvmfPkg/CpuHotplugSmm/CpuHotplug.c 120 OvmfPkg/OvmfPkg.dec 120 total Please rework the patches that modify: 85 OvmfPkg/CpuHotplugSmm/QemuCpuhp.c 90 OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c 91 OvmfPkg/Include/Library/CpuHotEjectData.h 97 OvmfPkg/CpuHotplugSmm/CpuHotplug.c so that their line lengths remain under 80 characters. Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70782): https://edk2.groups.io/g/devel/message/70782 Mute This Topic: https://groups.io/mt/80125307/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-