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

@@ -56,6 +56,8 @@
/* TODO: We may need to get this addr from guest ACPI instead of hardcode here */
#define RT_VM_PM1A_CNT_ADDR 0x404U
#define RT_VM_PM1A_SLP_TYP 0x1c00U
#define RT_VM_PM1A_SLP_EN 0x2000U
/**
* @brief Hypercall