hv: create gdt for guest to start from protected mode

In current implementation, on sbl platform, vm0 bsp
starts from 64bit mode. And hv need to prepare init
page table for it.

In this patch series, on sbl platform, vm0 bsp starts
from non-paging protected mode.
This patch prepares an init gdt for vm0 bsp on sbl
platform.

Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
Binbin Wu
2018-05-15 15:34:07 +08:00
committed by lijinxia
parent 9e7179c950
commit 881eaa6104
2 changed files with 35 additions and 0 deletions

View File

@@ -123,6 +123,8 @@ extern vm_sw_loader_t vm_sw_loader;
int copy_from_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
int copy_to_vm(struct vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
uint32_t create_guest_init_gdt(struct vm *vm, uint32_t *limit);
#endif /* !ASSEMBLER */
#endif /* GUEST_H*/