audk/OvmfPkg/Include/IndustryStandard
Ankur Arora f053288863 OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject
Add logic in EjectCpu() to do the actual the CPU ejection.

On the BSP, ejection happens by first selecting the CPU via
its QemuSelector and then sending the QEMU "eject" command.
QEMU in-turn signals the remote VCPU thread which context-switches
the CPU out of the SMI handler.

Meanwhile the CPU being ejected, waits around in its holding
area until it is context-switched out. Note that it is possible
that a slow CPU gets ejected before it reaches the wait loop.
However, this would never happen before it has executed the
"AllCpusInSync" loop in SmiRendezvous().
It can mean that an ejected CPU does not execute code after
that point but given that the CPU state will be destroyed by
QEMU, the missed cleanup is no great loss.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Aaron Young <aaron.young@oracle.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Message-Id: <20210312062656.2477515-10-ankur.a.arora@oracle.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: unneeded inner QemuSelector declaration in EjectCpu()
 triggers VS warning #4456 (local variable shadowed); remove it]
2021-03-16 13:21:46 +00:00
..
Xen OvmfPkg/Xen: Fix various typos 2020-02-10 22:30:07 +00:00
Bhyve.h OvmfPkg: Add BaseResetSystemLibBhyve 2020-05-05 19:40:40 +00:00
E820.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
FusionMptScsi.h OvmfPkg/MptScsiDxe: Implement the PassThru method 2020-05-05 20:43:02 +00:00
I440FxPiix4.h OvmfPkg/IndustryStandard: define macros for QEMU's CPU hotplug registers 2020-01-29 17:28:22 +00:00
InstructionParsing.h OvmfPkg/VmgExitLib: Add support for IOIO_PROT NAE events 2020-08-17 02:46:39 +00:00
LegacyVgaBios.h OvmfPkg: Add VBE2 mode info structure to LegacyVgaBios.h 2020-04-30 14:03:44 +00:00
LinuxBzimage.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
LsiScsi.h OvmfPkg/LsiScsiDxe: Process the SCSI Request Packet 2020-07-17 20:51:55 +00:00
PvScsi.h OvmfPkg/PvScsiDxe: Define device interface structures and constants 2020-03-30 16:45:07 +00:00
Q35MchIch9.h OvmfPkg/CpuHotplugSmm: introduce skeleton for CPU Hotplug SMM driver 2020-03-04 12:22:07 +00:00
QemuCpuHotplug.h OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject 2021-03-16 13:21:46 +00:00
QemuFwCfg.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
QemuPciBridgeCapabilities.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
QemuTpm.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
Virtio.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
Virtio10.h OvmfPkg/VirtioFsDxe: DriverBinding: open VirtioDevice, install SimpleFs 2020-12-21 17:16:23 +00:00
Virtio10Net.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
Virtio095.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
Virtio095Net.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
VirtioBlk.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
VirtioFs.h OvmfPkg/VirtioFsDxe: add helper for determining file mode bits update 2020-12-21 17:16:23 +00:00
VirtioGpu.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
VirtioNet.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
VirtioScsi.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00