vm_state: Update vm state VM_STATE_INVALID to VM_POWERED_OFF

Replace the vm state VM_STATE_INVALID to VM_POWERED_OFF.
Also replace is_valid_vm() with is_poweroff_vm().
Add API is_created_vm() to identify VM created state.

Tracked-On: #3082
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Yin Fengwei
2019-05-07 22:10:52 +08:00
committed by ACRN System Integration
parent 21b82d8815
commit 8626e5aa3a
6 changed files with 47 additions and 34 deletions

View File

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