Crate applevisor_sys

Source
Expand description

Unsafe Rust bindings for the Apple Silicon Hypervisor.framework

These unsafe bindings provide access to the Apple Silicon Hypervisor.framework from Rust programs. It is recommended to use the safe version of this library available at the following locations:

Structs§

hv_vcpu_exit_exception_t
The structure that describes information about an exit from the virtual CPU (vCPU) to the host.
hv_vcpu_exit_t
Information about an exit from the vCPU to the host.

Enums§

hv_cache_type_t
The structure that describes an instruction or data cache element.
hv_error_t
Errors returned by Hypervisor functions.
hv_exit_reason_t
The type that describes the event that triggered a guest exit to the host.
hv_feature_reg_t
The type that defines feature registers.
hv_interrupt_type_t
The type that defines the vCPU’s interrupts.
hv_reg_t
The type that defines general registers.
hv_simd_fp_reg_t
The type that defines SIMD and floating-point registers.
hv_sys_reg_t
The type of system registers.

Constants§

HV_MEMORY_EXEC
The value that represents the memory-execute permission.
HV_MEMORY_READ
The value that represents the memory-read permission.
HV_MEMORY_WRITE
The value that represents the memory-write permission.

Functions§

hv_vcpu_config_create
Creates a vCPU configuration object.
hv_vcpu_config_get_ccsidr_el1_sys_reg_values
Returns the Cache Size ID Register (CCSIDR_EL1) values for the vCPU configuration and cache type you specify.
hv_vcpu_config_get_feature_reg
Gets the value of a feature register.
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_get_exec_time
Returns, by reference, the cumulative execution time of a vCPU, in nanoseconds.
hv_vcpu_get_pending_interrupt
Gets pending interrupts for a vCPU.
hv_vcpu_get_reg
Gets the current value of a vCPU register.
hv_vcpu_get_simd_fp_reg
Gets the current value of a vCPU SIMD and FP register.
hv_vcpu_get_sys_reg
Gets the current value of a vCPU system register.
hv_vcpu_get_trap_debug_exceptions
Gets whether debug exceptions exit the guest.
hv_vcpu_get_trap_debug_reg_accesses
Gets whether debug-register accesses exit the guest.
hv_vcpu_get_vtimer_mask
Gets the virtual timer mask.
hv_vcpu_get_vtimer_offset
Returns the vTimer offset for the vCPU ID you specify.
hv_vcpu_run
Starts the execution of a vCPU.
hv_vcpu_set_pending_interrupt
Sets pending interrupts for a vCPU.
hv_vcpu_set_reg
Sets the value of a vCPU register.
hv_vcpu_set_simd_fp_reg
Sets the value of a vCPU SIMD&FP register.
hv_vcpu_set_sys_reg
Sets the value of a vCPU system register.
hv_vcpu_set_trap_debug_exceptions
Sets whether debug exceptions exit the guest.
hv_vcpu_set_trap_debug_reg_accesses
Sets whether debug-register accesses exit the guest.
hv_vcpu_set_vtimer_mask
Sets or clears the virtual timer mask.
hv_vcpu_set_vtimer_offset
Sets the vTimer offset to a value that you provide.
hv_vcpus_exit
Forces an immediate exit of a set of vCPUs of the VM.
hv_vm_create
Creates a VM instance for the current process.
hv_vm_destroy
Destroys the VM instance associated with the current process.
hv_vm_get_max_vcpu_count
Returns the maximum number of vCPUs that the hypervisor supports.
hv_vm_map
Maps a region in the virtual address space of the current process 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_unmap
Unmaps a region in the guest physical address space of the VM.

Type Aliases§

hv_ipa_t
The type of an intermediate physical address, which is a guest physical address space of the VM.
hv_memory_flags_t
The permissions for guest physical memory regions.
hv_return_t
The return type of framework functions.
hv_simd_fp_uchar16_t
hv_vcpu_config_t
The type that defines a vCPU configuration.
hv_vcpu_t
An opaque value that represents a vCPU instance.
hv_vm_config_t
The type that defines a virtual-machine configuration.