hv: console: switch back to HV shell on VM pause

A VM may transition to VM_PAUSED state while its console is being used.

Jump back to the HV shell if this happens so the console does not appear
stuck.

Tracked-On: #5411
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Peter Fang 2020-10-25 01:56:16 -07:00 committed by wenlingz
parent 70b1218952
commit e5edc7c090
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ static struct acrn_vuart *vuart_console_active(void)
if (console_vmid < CONFIG_MAX_VM_NUM) {
vm = get_vm_from_vmid(console_vmid);
if (!is_poweroff_vm(vm)) {
if (!is_paused_vm(vm) && !is_poweroff_vm(vm)) {
vu = vm_console_vuart(vm);
} else {
/* Console vm is invalid, switch back to HV-Shell */