hv: add struct acrn_vcpu_regs

Add struct acrn_vcpu_regs and make struct boot_ctx based on
struct acrn_vcpu_regs.

vm0_boot_context is also changed from struct boot_ctx to struct
acrn_vcpu_regs.

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Yin Fengwei
2018-09-28 14:36:53 +08:00
committed by lijinxia
parent 843f7721f0
commit ba1aa40707
5 changed files with 98 additions and 80 deletions

View File

@@ -489,8 +489,8 @@ int prepare_vcpu(struct vm *vm, uint16_t pcpu_id)
vcpu->arch_vcpu.cpu_mode = CPU_MODE_PROTECTED;
#else
if (is_vm0(vcpu->vm)) {
struct boot_ctx *vm0_init_ctx =
(struct boot_ctx *)(&vm0_boot_context);
struct acrn_vcpu_regs *vm0_init_ctx =
(struct acrn_vcpu_regs *)(&vm0_boot_context);
/* VM0 bsp start mode is decided by the boot context
* setup by bootloader / bios */
if ((vm0_init_ctx->ia32_efer & MSR_IA32_EFER_LMA_BIT) &&