From: "Ankur Arora" <ankur.a.arora@oracle.com>
To: devel@edk2.groups.io
Cc: imammedo@redhat.com, lersek@redhat.com,
Ankur Arora <ankur.a.arora@oracle.com>
Subject: [PATCH v3 00/10] support CPU hot-unplug
Date: Thu, 14 Jan 2021 23:45:23 -0800 [thread overview]
Message-ID: <20210115074533.277448-1-ankur.a.arora@oracle.com> (raw)
[ Resending, again to the correct list. Apologies to everybody
who got this twice. ]
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-imammedo@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.
Patch 2 and 9,
("OvmfPkg/CpuHotplugSmm: collect hot-unplug events")
("OvmfPkg/SmmControl2Dxe: negotiate hot-unplug")
handle the QEMU protocol logic for collection of hot-unplug events or
to handle the protocol negotiation.
Patches 4 and 5,
("UefiCpuPkg: add CPU ejection support")
("OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state")
setup and init the PiSmmCpuDxeSmm CPU ejection state.
Patches 6, 7, and 8,
("OvmfPkg/CpuHotplugSmm: support CPU eject")
("OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()")
("OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection")
contain the core of the changes. The first one adds a NOP CPU ejection
handler, the second processing CPU ejection events and removing the
CPUs to be unplugged in a pen, and the third doing the actual eject.
Patch 10 ("MdePkg: use CpuPause() in CpuDeadLoop()") is unrelated to the
series and just adds a CpuPause() in the CpuDeadLoop(().
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-v3
Changelog:
v3:
- Use a saner PCD based interface to share state between PiSmmCpuDxeSmm
and OvmfPkg/CpuHotplugSmm
- Cleaner split of the hot-unplug code
v2:
- Do the ejection via SmmCpuFeaturesRendezvousExit()
URL: https://patchew.org/EDK2/20210107195515.106158-1-ankur.a.arora@oracle.com/
RFC:
URL: https://patchew.org/EDK2/20201208053432.2690694-1-ankur.a.arora@oracle.com/
Please review.
Thanks
Ankur
Ankur Arora (10):
OvmfPkg/CpuHotplugSmm: refactor hotplug logic
OvmfPkg/CpuHotplugSmm: collect hot-unplug events
OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper
UefiCpuPkg: add CPU ejection support
OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state
OvmfPkg/CpuHotplugSmm: support CPU eject
OvmfPkg/CpuHotplugSmm: introduce UnplugCpus()
OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection
OvmfPkg/SmmControl2Dxe: negotiate hot-unplug
MdePkg: use CpuPause() in CpuDeadLoop()
MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +-
OvmfPkg/CpuHotplugSmm/CpuHotplug.c | 424 ++++++++++++++++-----
OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf | 1 +
OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | 58 ++-
OvmfPkg/CpuHotplugSmm/QemuCpuhp.h | 6 +
OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h | 2 +
.../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 68 ++++
.../SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 3 +
OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 21 +-
UefiCpuPkg/Include/CpuHotPlugData.h | 21 +
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 +
UefiCpuPkg/UefiCpuPkg.dec | 5 +
UefiCpuPkg/UefiCpuPkg.uni | 4 +
13 files changed, 515 insertions(+), 103 deletions(-)
--
2.9.3
next reply other threads:[~2021-01-15 7:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 7:45 Ankur Arora [this message]
2021-01-15 7:45 ` [PATCH v3 01/10] OvmfPkg/CpuHotplugSmm: refactor hotplug logic Ankur Arora
2021-01-15 7:45 ` [PATCH v3 02/10] OvmfPkg/CpuHotplugSmm: collect hot-unplug events Ankur Arora
2021-01-15 7:45 ` [PATCH v3 03/10] OvmfPkg/CpuHotplugSmm: add Qemu Cpu Status helper Ankur Arora
2021-01-15 7:45 ` [PATCH v3 04/10] UefiCpuPkg: add CPU ejection support Ankur Arora
2021-01-15 8:17 ` [edk2-devel] " Laszlo Ersek
2021-01-15 18:16 ` Ankur Arora
2021-01-15 18:44 ` Laszlo Ersek
2021-01-15 19:22 ` Ankur Arora
2021-01-15 7:45 ` [PATCH v3 05/10] OvmfPkg/SmmCpuFeaturesLib: init CPU ejection state Ankur Arora
2021-01-15 7:45 ` [PATCH v3 06/10] OvmfPkg/CpuHotplugSmm: support CPU eject Ankur Arora
2021-01-15 7:45 ` [PATCH v3 07/10] OvmfPkg/CpuHotplugSmm: introduce UnplugCpus() Ankur Arora
2021-01-15 7:45 ` [PATCH v3 08/10] OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection Ankur Arora
2021-01-15 7:45 ` [PATCH v3 09/10] OvmfPkg/SmmControl2Dxe: negotiate hot-unplug Ankur Arora
2021-01-15 7:45 ` [PATCH v3 10/10] MdePkg: use CpuPause() in CpuDeadLoop() Ankur Arora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210115074533.277448-1-ankur.a.arora@oracle.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox