HV: Set vm state as with VM_POWERING_OFF when RTVM poweroff by itself

We set the vm state as VM_POWERING_OFF when RTVM is trying to poweroff by itself.
We will check it when trying to pause vCPUs of RTVM. Only if vm state equal to
VM_POWERING_OFF, we take action to pause the vCPUs of RTVM. Otherwise, we will
reject the pause request.

Tracked-On: #2865
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
This commit is contained in:
Kaige Fu
2019-03-24 10:00:37 +00:00
committed by ACRN System Integration
parent 83d11bbff8
commit 8ad5adced7
3 changed files with 12 additions and 3 deletions

View File

@@ -88,6 +88,7 @@ enum vm_state {
VM_STATE_INVALID = 0,
VM_CREATED, /* VM created / awaiting start (boot) */
VM_STARTED, /* VM started (booted) */
VM_POWERING_OFF, /* RTVM only, it is trying to poweroff by itself */
VM_PAUSED, /* VM paused */
};