hv: add vm restart API

And export the API to DM. DM will do system reboot/S3 resume based
on this API.

Also add the pre-assumption description for some vm APIs.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-05-11 19:19:27 +08:00
committed by lijinxia
parent a4eebb0ef8
commit f576f97ea8
6 changed files with 72 additions and 4 deletions

View File

@@ -76,6 +76,20 @@ int32_t hcall_create_vm(struct vm *vm, uint64_t param);
*/
int32_t hcall_destroy_vm(uint16_t vmid);
/**
* @brief reset virtual machine
*
* Reset a virtual machine, it will make target VM rerun from
* pre-defined entry. Comparing to start vm, this function reset
* each vcpu state and do some initialization for guest.
* The function will return -1 if the target VM does not exist.
*
* @param vmid ID of the VM
*
* @return 0 on success, non-zero on error.
*/
int32_t hcall_reset_vm(uint16_t vmid);
/**
* @brief start virtual machine
*