mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-04-27 11:22:17 +00:00
hv: fix stac/clac context in get_initrd_load_addr()
Tracked-On: #8761 Signed-off-by: Haoyu Tang <haoyu.tang@intel.com>
This commit is contained in:
parent
ef49283e51
commit
bff0493d25
@ -61,7 +61,7 @@ static void *get_initrd_load_addr(struct acrn_vm *vm, uint64_t kernel_start)
|
||||
kernel_init_size = zeropage->hdr.init_size;
|
||||
kernel_align = zeropage->hdr.kernel_alignment;
|
||||
initrd_addr_max = zeropage->hdr.initrd_addr_max;
|
||||
stac();
|
||||
clac();
|
||||
kernel_end = roundup(kernel_start, kernel_align) + kernel_init_size;
|
||||
|
||||
if (initrd_addr_max != 0U) {
|
||||
|
@ -109,7 +109,8 @@ static void *do_load_elf64(struct acrn_vm *vm)
|
||||
*/
|
||||
(void)copy_to_gpa(vm, p_elf_img + p_prg_tbl_head64->p_offset,
|
||||
p_prg_tbl_head64->p_paddr, (uint32_t)p_prg_tbl_head64->p_filesz);
|
||||
/* copy_to_gpa has it's stac/clac inside. So call stac again here. */
|
||||
/* copy_to_gpa has its own stac/clac inside. Call stac again here to keep
|
||||
* the context. */
|
||||
stac();
|
||||
}
|
||||
p_prg_tbl_head64++;
|
||||
@ -174,7 +175,8 @@ static void *do_load_elf32(struct acrn_vm *vm)
|
||||
*/
|
||||
(void)copy_to_gpa(vm, p_elf_img + p_prg_tbl_head32->p_offset,
|
||||
p_prg_tbl_head32->p_paddr, p_prg_tbl_head32->p_filesz);
|
||||
/* copy_to_gpa has it's stac/clac inside. So call stac again here. */
|
||||
/* copy_to_gpa has its own stac/clac inside. Call stac again here to keep
|
||||
* the context. */
|
||||
stac();
|
||||
}
|
||||
p_prg_tbl_head32++;
|
||||
|
Loading…
Reference in New Issue
Block a user