From 3cc51a825416201a8b08714123975c84f5e9cd94 Mon Sep 17 00:00:00 2001 From: Peter Fang Date: Sun, 25 Oct 2020 01:56:16 -0700 Subject: [PATCH] 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 Acked-by: Eddie Dong --- hypervisor/debug/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/debug/console.c b/hypervisor/debug/console.c index 467a2981f..3456e80dc 100644 --- a/hypervisor/debug/console.c +++ b/hypervisor/debug/console.c @@ -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 */