HV: add get_sos_vm api

This patch creates a new get_sos_vm() api to replace get_vm_from_vmid(0U)
because VM 0 might not be SOS VM now;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-01-21 15:33:17 +08:00
committed by Eddie Dong
parent f3014a3c89
commit ec199d9609
5 changed files with 15 additions and 7 deletions

View File

@@ -73,6 +73,12 @@ struct acrn_vm *get_vm_from_vmid(uint16_t vm_id)
return &vm_array[vm_id];
}
/* return a pointer to the virtual machine structure of SOS VM */
struct acrn_vm *get_sos_vm(void)
{
return sos_vm_ptr;
}
/**
* @pre vm_config != NULL
*/