mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
acrn-dm: add some logs for vm state transition
add logs for vm state transition to help analyze some problems. Tracked-On: #4098 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -615,6 +615,7 @@ vm_system_reset(struct vmctx *ctx)
|
||||
|
||||
vm_reset_vdevs(ctx);
|
||||
vm_reset(ctx);
|
||||
pr_info("%s: setting VM state to %s\n", __func__, vm_state_to_str(VM_SUSPEND_NONE));
|
||||
vm_set_suspend_mode(VM_SUSPEND_NONE);
|
||||
|
||||
/* set the BSP init state */
|
||||
@@ -711,7 +712,8 @@ num_vcpus_allowed(struct vmctx *ctx)
|
||||
static void
|
||||
sig_handler_term(int signo)
|
||||
{
|
||||
printf("Receive SIGINT to terminate application...\n");
|
||||
pr_info("Received SIGINT to terminate application...\n");
|
||||
pr_info("%s: setting VM state to %s\n", __func__, vm_state_to_str(VM_SUSPEND_POWEROFF));
|
||||
vm_set_suspend_mode(VM_SUSPEND_POWEROFF);
|
||||
mevent_notify();
|
||||
}
|
||||
@@ -1065,6 +1067,7 @@ main(int argc, char *argv[])
|
||||
vm_destroy(ctx);
|
||||
_ctx = 0;
|
||||
|
||||
pr_info("%s: setting VM state to %s\n", __func__, vm_state_to_str(VM_SUSPEND_NONE));
|
||||
vm_set_suspend_mode(VM_SUSPEND_NONE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user