mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: Update SOS BSP to use new API to init BSP state
We move the SOS BSP state init to vm loader and drop function init_guest_context_vm0_bsp. Update the definition of vm0_boot_context to fix code violations. Tracked-On: #1231 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -138,6 +138,8 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
}
|
||||
#endif
|
||||
|
||||
set_vcpu_regs(vcpu, (struct acrn_vcpu_regs *)&vm0_boot_context);
|
||||
|
||||
/* calculate the kernel entry point */
|
||||
zeropage = (struct zero_page *)sw_kernel->kernel_src_addr;
|
||||
kernel_entry_offset = (uint32_t)(zeropage->hdr.setup_sects + 1U) * 512U;
|
||||
@@ -151,9 +153,10 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
+ kernel_entry_offset);
|
||||
if (is_vcpu_bsp(vcpu)) {
|
||||
/* Set VCPU entry point to kernel entry */
|
||||
vcpu->entry_addr = sw_kernel->kernel_entry_addr;
|
||||
vcpu_set_rip(vcpu, (uint64_t)sw_kernel->kernel_entry_addr);
|
||||
pr_info("%s, VM %hu VCPU %hu Entry: 0x%016llx ",
|
||||
__func__, vm->vm_id, vcpu->vcpu_id, vcpu->entry_addr);
|
||||
__func__, vm->vm_id, vcpu->vcpu_id,
|
||||
sw_kernel->kernel_entry_addr);
|
||||
}
|
||||
|
||||
/* Calculate the host-physical address where the guest will be loaded */
|
||||
|
Reference in New Issue
Block a user