hv_vcpu_create

Function hv_vcpu_create 

Source
pub unsafe extern "C" fn hv_vcpu_create(
    vcpu: *mut hv_vcpu_t,
    exit: *mut *const hv_vcpu_exit_t,
    config: hv_vcpu_config_t,
) -> hv_return_t
Expand description

Creates a vCPU instance for the current thread.

§Parameters

  • vcpu: An argument that the hypervisor populates with the instance of a vCPU on a successful return.
  • exit: The pointer to the vCPU exit information. The function hv_vcpu_run updates this structure on return.
  • config: The configuration of the vCPU or nil for a default configuration.

§Return Value

HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.