hv: fix vulnerability when VM is destroyed

In hypervisor fuzzing test, hypervisor will hang
 if issuing HV_VM_SET_MEMORY_REGIONS hypercall after
 target VM is destroyed.

 this patch is to fix above vulnerability.

Tracked-On: #2849
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yonghua Huang
2019-03-26 01:37:46 +08:00
committed by ACRN System Integration
parent 5a7be9b869
commit 868778a68b
3 changed files with 9 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ struct vm_pm_info {
#define VM_MONO_GUEST 0x01
/* Enumerated type for VM states */
enum vm_state {
VM_STATE_UNKNOWN = 0,
VM_STATE_INVALID = 0,
VM_CREATED, /* VM created / awaiting start (boot) */
VM_STARTED, /* VM started (booted) */
VM_PAUSED, /* VM paused */