mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: init: unify init logic for vm0 bsp
In current code, VM0 BSP start mode is hardcoded, in this patch VM0 BSP start mode is decided by the boot context prepared by bootloader/BIOS. In current code, VM0 BSP VMCS is override only on UEFI platform. In this patch, VM0 BSP VMCS is override on both SBL & UEFI platforms. Also restructure the code of guest init code. In this patch, a vcpu run_context is initilaized first according to vcpu mode. Then write the value to vmcs according to run_context value. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -134,6 +134,7 @@ int copy_to_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code, uint64_t *fault_addr);
|
||||
|
||||
uint64_t create_guest_init_gdt(struct vm *vm, uint32_t *limit);
|
||||
extern uint8_t vm0_boot_context[];
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_req_info(char *str_arg, int str_max);
|
||||
|
||||
Reference in New Issue
Block a user