HV: life_mngr: refine platform shutdown when User VM fails to shutdown
Currently, the lifecycle manager in Service VM will issue poweroff command to shutdown service VM when User VM fails to shutdown. The post-launched RTVM with virtio device may hang after Service VM shutdown. In this patch, the lifecycle manager in Service VM will stop to shut down service VM when User VM fails to shutdown. Users have chance to fix User VM shutdown failure (such as forcelly shutdown User VM or execute poweroff command in User VM), after the failure is fixed, user can trigger S5 in service VM to shutdown platform gracefully. Tracked-On: #6652 Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
This commit is contained in:
parent
417c369feb
commit
93d0ad543e
|
@ -68,11 +68,12 @@ static void start_system_shutdown(void)
|
|||
LOG_WRITE("UART connection list is empty, will trigger shutdown system\n");
|
||||
close_socket(sock_server);
|
||||
stop_listen_uart_channel_dev(channel);
|
||||
if (wait_post_vms_shutdown())
|
||||
LOG_WRITE("Service VM start to power off here\n");
|
||||
else
|
||||
LOG_WRITE("Timeout waiting for VMs poweroff, will force poweroff VMs\n");
|
||||
system_shutdown_flag = true;
|
||||
if (wait_post_vms_shutdown()) {
|
||||
LOG_WRITE("Service VM starts to power off.\n");
|
||||
system_shutdown_flag = true;
|
||||
} else {
|
||||
LOG_WRITE("Some User VMs failed to power off, cancelled the platform shut down process.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue