audk/OvmfPkg/Include
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
..
Guid OvmfPkg/AmdSev/SecretDxe: make secret location naming generic 2020-12-18 10:45:52 +00:00
IndustryStandard OvmfPkg/CpuHotplugSmm: do actual CPU hot-eject 2021-03-16 13:21:46 +00:00
Library OvmfPkg/PciHostBridgeUtilityLib: Extend GetRootBridges() with BusMin/BusMax 2021-01-20 16:14:20 +00:00
Pcd OvmfPkg: define CPU_HOT_EJECT_DATA 2021-03-16 13:21:46 +00:00
Protocol OvmfPkg: Fix spelling mistake for occurred 2020-08-19 00:54:23 +00:00
Register OvmfPkg: strip trailing whitespace 2019-10-04 11:18:32 +01:00
OvmfPlatforms.h OvmfPkg: Add bhyve support into AcpiTimerLib 2020-04-30 13:46:11 +00:00