Contents

hv_vcpu_create(_:_:_:)

Creates a vCPU instance for the current thread.

Declaration

func hv_vcpu_create(_ vcpu: UnsafeMutablePointer<hv_vcpu_t>, _ exit: UnsafeMutablePointer<UnsafeMutablePointer<hv_vcpu_exit_t>?>, _ config: hv_vcpu_config_t?) -> hv_return_t

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.

    Apple silicon only.

  • config:

    The configuration of the vCPU or nil for a default configuration.

    Apple silicon only.

Return Value

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

Discussion

Intel-based Mac computers have different parameters:

See Also

Creation and destruction