diff --git a/devicemodel/core/main.c b/devicemodel/core/main.c index 33c2eefbf..d7538bcde 100644 --- a/devicemodel/core/main.c +++ b/devicemodel/core/main.c @@ -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