Module ffi

Source
Expand description

Bindings to the Hypervisor Framework

Constants§

HV_BAD_ARGUMENT
HV_BUSY
HV_ERROR
HV_MEMORY_EXEC
HV_MEMORY_READ
HV_MEMORY_WRITE
HV_NO_DEVICE
HV_NO_RESOURCES
HV_SUCCESS
HV_UNSUPPORTED
HV_VCPU_DEFAULT
HV_VM_DEFAULT

Functions§

hv_vcpu_create
Creates a vCPU instance for the current thread
hv_vcpu_destroy
Destroys the vCPU instance associated with the current thread
hv_vcpu_enable_native_msr
Enables an MSR to be used natively by the VM
hv_vcpu_flush
Forces flushing of cached vCPU state
hv_vcpu_get_exec_time
Returns the cumulative execution time of a vCPU in nanoseconds
hv_vcpu_interrupt
Forces an immediate VMEXIT of a set of vCPUs of the VM
hv_vcpu_invalidate_tlb
Invalidates the TLB of a vCPU
hv_vcpu_read_fpstate
Returns the current architectural x86 floating point and SIMD state of a vCPU
hv_vcpu_read_msr
Returns the current value of an MSR of a vCPU
hv_vcpu_read_register
Returns the current value of an architectural x86 register of a vCPU
hv_vcpu_run
Executes a vCPU
hv_vcpu_write_fpstate
Sets the architectural x86 floating point and SIMD state of a vCPU
hv_vcpu_write_msr
Set the value of an MSR of a vCPU
hv_vcpu_write_register
Sets the value of an architectural x86 register of a vCPU
hv_vm_create
Creates a VM instance for the current Mach task
hv_vm_destroy
Destroys the VM instance associated with the current Mach task
hv_vm_map
Maps a region in the virtual address space of the current task into the guest physical address space of the VM
hv_vm_protect
Modifies the permissions of a region in the guest physical address space of the VM
hv_vm_sync_tsc
Synchronizes guest Timestamp-Counters (TSC) across all vCPUs
hv_vm_unmap
Unmaps a region in the guest physical address space of the VM
hv_vmx_read_capability
Returns the VMX capabilities of the host processor
hv_vmx_vcpu_read_vmcs
Returns the current value of a VMCS field of a vCPU
hv_vmx_vcpu_set_apic_address
Sets the address of the guest APIC for a vCPU in the guest physical address space of the VM
hv_vmx_vcpu_write_vmcs
Sets the value of a VMCS field of a vCPU

Type Aliases§

hv_gpaddr_t
Type of a guest physical address
hv_memory_flags_t
Guest physical memory region permissions for hv_vm_map() and hv_vm_protect()
hv_return_t
Hypervisor Framework return code
hv_uvaddr_t
Type of a user virtual address
hv_vcpuid_t
Type of a vCPU ID
hv_vm_options_t
Options for hv_vcpu_create()