dm: add call to set BSP init state for UOS S3 and system reset

For UOS, we need to call hypercall to set BSP init state now.
So we can't combint the vm start and vm reset (vm reset will
reset the vcpu context). Remove vm start from reset_vm. DM
needs to start vm after every vm reset.

Update DM to set UOS BSP init state after vm reset and before
vm start.

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:
Yin Fengwei 2018-09-26 13:50:34 +08:00 committed by wenlingz
parent 113adea0de
commit 29190ed219

View File

@ -576,10 +576,13 @@ vm_system_reset(struct vmctx *ctx)
}
vm_reset_vdevs(ctx);
acrn_sw_load(ctx);
vm_reset(ctx);
vm_set_suspend_mode(VM_SUSPEND_NONE);
/* set the BSP init state */
acrn_sw_load(ctx);
vm_set_vcpu_regs(ctx, &ctx->bsp_regs);
vm_run(ctx);
}
static void
@ -616,6 +619,10 @@ vm_suspend_resume(struct vmctx *ctx)
pm_backto_wakeup(ctx);
vm_reset_watchdog(ctx);
vm_reset(ctx);
/* set the BSP init state */
vm_set_vcpu_regs(ctx, &ctx->bsp_regs);
vm_run(ctx);
}
static void