HV: Correct some naming issues

For the guest OS loaders, prapare_loading_xxx are not accurate for
what those functions actually do. Now they are changed to load_xxx:
load_rawimage, load_bzimage.

And the 'bsp' expression is confusing in the comments for
init_vcpu_protect_mode_regs, changed to a better way.

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zhou, Wu 2021-08-11 17:40:32 +08:00 committed by wenlingz
parent 3124018917
commit e78aacbe55
2 changed files with 5 additions and 5 deletions

View File

@ -328,7 +328,7 @@ static uint64_t create_zero_page(struct acrn_vm *vm, uint64_t load_params_gpa)
/**
* @pre vm != NULL
*/
static void prepare_loading_bzimage(struct acrn_vm *vm, struct acrn_vcpu *vcpu,
static void load_bzimage(struct acrn_vm *vm, struct acrn_vcpu *vcpu,
uint64_t load_params_gpa, uint64_t kernel_load_gpa)
{
uint32_t i;
@ -420,7 +420,7 @@ int32_t vm_bzimage_loader(struct acrn_vm *vm)
/* We boot bzImage from protected mode directly */
init_vcpu_protect_mode_regs(vcpu, BZIMG_INITGDT_GPA(load_params_gpa));
prepare_loading_bzimage(vm, vcpu, load_params_gpa, kernel_load_gpa);
load_bzimage(vm, vcpu, load_params_gpa, kernel_load_gpa);
ret = 0;
}

View File

@ -10,7 +10,7 @@
/**
* @pre vm != NULL
*/
static void prepare_loading_rawimage(struct acrn_vm *vm)
static void load_rawimage(struct acrn_vm *vm)
{
struct sw_kernel_info *sw_kernel = &(vm->sw.kernel_info);
struct sw_module_info *acpi_info = &(vm->sw.acpi_info);
@ -36,7 +36,7 @@ int32_t vm_rawimage_loader(struct acrn_vm *vm)
/*
* TODO:
* - We need to initialize the guest bsp registers according to
* - We need to initialize the guest BSP(boot strap processor) registers according to
* guest boot mode (real mode vs protect mode)
* - The memory layout usage is unclear, only GDT might be needed as its boot param.
* currently we only support Zephyr which has no needs on cmdline/e820/efimmap/etc.
@ -44,7 +44,7 @@ int32_t vm_rawimage_loader(struct acrn_vm *vm)
*/
init_vcpu_protect_mode_regs(vcpu_from_vid(vm, BSP_CPU_ID), vgdt_gpa);
prepare_loading_rawimage(vm);
load_rawimage(vm);
return ret;
}