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

@@ -266,6 +266,17 @@ int32_t hcall_create_vcpu(struct vm *vm, uint16_t vmid, uint64_t param)
return ret;
}
int32_t hcall_reset_vm(uint16_t vmid)
{
struct vm *target_vm = get_vm_from_vmid(vmid);
if ((target_vm == NULL) || is_vm0(target_vm))
return -1;
reset_vm(target_vm);
return 0;
}
int32_t hcall_assert_irqline(struct vm *vm, uint16_t vmid, uint64_t param)
{
int32_t ret = 0;