acrn-hypervisor/efi-stub
Tw 18b04451e1 efi-stub: reset all APs after entering guest mode
In current hv implementation, we assume all AP have no context before
jumping into guest mode. But this is not true in all UEFI bios. BIOS
could have enabled all (or some of) APs at first. These APs could stay
in a run loop or wait for a semaphore. But after hv takes over control from
efi-stub, all of these AP environments will be simply dropped because
we don't support AP context save/restore for now. As a result,
BSP's ExitBootService will hang forver because it's waiting for AP in its
way (by waiting for a semaphore for example), unfortunately APs are now
in the context that hv provides in which they usually stay in idle loop.

To fix the issue above, we could have two solutions:
1. Save AP's runtime context before entering hv and restore context
after hv jumps back.
2. After hv jumps back, reset all the APs in the UEFI way, so the
previous context will be thrown away and a fresh new starts. Moreover
this new one is under virtualization.

Currently, we adopt the second one by disabling all the APs before
virtualization and then enabling them after hv jumps back. A reset
will be triggered. And this is guaranteed by UEFI MP Service protocol.

Tracked-On: #2435
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-02-01 08:56:05 +08:00
..
clearlinux Doc: Update GSG for v0.5 version and launch and acrn.conf sample script 2019-01-16 16:28:26 +08:00
boot.c efi-stub: reset all APs after entering guest mode 2019-02-01 08:56:05 +08:00
boot.h EFI: fix potential memory overwrite due to mmap table 2019-01-29 11:01:34 +08:00
efilinux.h EFI: Allocate 2M aligned memory for hypervisor image 2019-01-24 11:59:21 +08:00
Makefile HV: modularization improve UEFI macro control code 2019-01-30 16:11:39 +08:00
malloc.c EFI: Allocate 2M aligned memory for hypervisor image 2019-01-24 11:59:21 +08:00
MpService.h efi-stub: reset all APs after entering guest mode 2019-02-01 08:56:05 +08:00
multiboot.h HV/DM: Unify the usage of aligned for structure definition with alignment 2018-12-20 14:08:28 +08:00
pe.c modulization:move out efi dir from hypervisor 2018-12-17 15:46:23 +08:00
stdlib.h modulization:move out efi dir from hypervisor 2018-12-17 15:46:23 +08:00