Files
acrn-hypervisor/hypervisor/arch/x86
Kaige Fu 8740232ad6 HV: Allow pause RTVM when its state is VM_CREATED
There are a lot of works to do between create_vm (HV will mark vm's state
as VM_CREATED at this stage) and vm_run (HV will mark vm's state as VM_STARTED),
like building mptable/acpi table, initializing mevent and vdevs. If there is
something goes wrong between create_vm and vm_run, the devicemodel will jumps
to the deinit process and will try to destroy the vm. For example, if the
vm_init_vdevs failed, the devicemodel will jumps to dev_fail and then destroy
the vm.

For normal vm in above situation, it is fine to destroy vm. And we can create and
start it next time. But for RTVM, we can't destroy the vm as the vm's state is
VM_CREATED. And we can only destroy vm when its state is VM_POWERING_OFF. So, the
vm will stay at VM_CREATED state and we will never have chance to destroy it.
Consequently, we can't create and start the vm next time.

This patch fixes it by allowing to pause and then destroy RTVM when its state is VM_CREATED.

Tracked-On: #3069
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-06-20 22:24:38 +08:00
..
2019-05-07 09:10:13 +08:00
2019-06-14 14:22:51 +08:00
2019-05-07 09:10:13 +08:00
2019-06-20 09:32:55 +08:00
2019-02-22 13:14:36 +08:00
2019-06-06 15:22:10 +08:00
2019-06-20 09:32:55 +08:00
2019-02-22 13:14:36 +08:00
2019-05-08 16:57:46 +08:00
2019-05-07 09:10:13 +08:00