From c5cfd7c200aa602c1ec6a94ddb0449746a8fc8bf Mon Sep 17 00:00:00 2001 From: Yin Fengwei Date: Mon, 27 May 2019 08:00:57 +0800 Subject: [PATCH] vm state: reset vm state to VM_CREATED when reset_vm is called When we call reset_vm() function to reset vm, the vm state should be reset to VM_CREATED as well. Tracked-On: #3182 Signed-off-by: Yin Fengwei Acked-by: Eddie Dong --- hypervisor/arch/x86/guest/vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 2f1ca331f..0976822ba 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -591,6 +591,7 @@ int32_t reset_vm(struct acrn_vm *vm) vioapic_reset(vm); destroy_secure_world(vm, false); vm->sworld_control.flag.active = 0UL; + vm->state = VM_CREATED; ret = 0; } else { ret = -1;