Crate applevisor_sys

Crate applevisor_sys 

Source
Expand description

§APPLEVISOR-SYS

Unsafe Rust bindings for the Apple Silicon Hypervisor Framework

These bindings provide low-level access to the Apple Silicon Hypervisor.framework from Rust programs.

Safe bindings based on this library are 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.
hv_vcpu_sme_state_t
Contains information about SME PSTATE.

Enums§

hv_allocate_flags_t
Memory allocation flags.
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_gic_distributor_reg_t
Type of an ARM GIC distributor register.
hv_gic_icc_reg_t
Type of an ARM GIC ICC system control register.
hv_gic_ich_reg_t
Type of an ARM GIC virtualization control system register.
hv_gic_icv_reg_t
Type of an ARM GIC ICV system control register.
hv_gic_intid_t
Type of an ARM GIC interrupt id.
hv_gic_msi_reg_t
Type of an ARM GIC Distributor message based interrupt register.
hv_gic_redistributor_reg_t
Type of an ARM GIC redistributor register.
hv_interrupt_type_t
The type that defines the vCPU’s interrupts.
hv_ipa_granule_t
Supported intermediate physical address (IPA) granules.
hv_reg_t
The type that defines general registers.
hv_simd_fp_reg_t
The type that defines SIMD and floating-point registers.
hv_sme_p_reg_t
Type of an ARM SME P predicate register.
hv_sme_z_reg_t
Type of an ARM SME Z vector register.
hv_sys_reg_t
The type of system registers.

Constants§

HV_MEMORY_EXEC
The value that represents the memory-execute permission.
HV_MEMORY_NONE
The value that represents no memory permission.
HV_MEMORY_READ
The value that represents the memory-read permission.
HV_MEMORY_WRITE
The value that represents the memory-write permission.
PAGE_SIZE
The size of a memory page on Apple Silicon.

Functions§

hv_gic_config_create
Create a GIC configuration object.
hv_gic_config_set_distributor_base
Set the GIC distributor region base address.
hv_gic_config_set_msi_interrupt_range
Sets the range of MSIs supported.
hv_gic_config_set_msi_region_base
Set the GIC MSI region base address.
hv_gic_config_set_redistributor_base
Set the GIC redistributor region base address.
hv_gic_create
Create a GIC v3 device for a VM configuration.
hv_gic_get_distributor_base_alignment
Gets the alignment in bytes for the base address of the GIC distributor region.
hv_gic_get_distributor_reg
Read a GIC distributor register.
hv_gic_get_distributor_size
Gets the size in bytes of the GIC distributor region.
hv_gic_get_icc_reg
Read a GIC ICC cpu system register.
hv_gic_get_ich_reg
Read a GIC ICH virtualization control system register.
hv_gic_get_icv_reg
Read a GIC ICV system register.
hv_gic_get_intid
Gets the interrupt id for reserved interrupts.
hv_gic_get_msi_reg
Read a GIC distributor MSI register.
hv_gic_get_msi_region_base_alignment
Gets the alignment in bytes for the base address of the GIC MSI region.
hv_gic_get_msi_region_size
Gets the size in bytes of the GIC MSI region.
hv_gic_get_redistributor_base
Gets the redistributor base guest physical address for the given vcpu.
hv_gic_get_redistributor_base_alignment
Gets the alignment in bytes for the base address of the GIC redistributor region.
hv_gic_get_redistributor_reg
Read a GIC redistributor register.
hv_gic_get_redistributor_region_size
Gets the total size in bytes of the GIC redistributor region.
hv_gic_get_redistributor_size
Gets the size in bytes of a single GIC redistributor.
hv_gic_get_spi_interrupt_range
Gets the range of SPIs supported.
hv_gic_reset
Reset the GIC device.
hv_gic_send_msi
Send a Message Signaled Interrupt (MSI).
hv_gic_set_distributor_reg
Write a GIC distributor register.
hv_gic_set_icc_reg
Write a GIC ICC cpu system register.
hv_gic_set_ich_reg
Write a GIC ICH virtualization control system register.
hv_gic_set_icv_reg
Write a GIC ICV system register.
hv_gic_set_msi_reg
Write a GIC distributor MSI register.
hv_gic_set_redistributor_reg
Write a GIC redistributor register.
hv_gic_set_spi
Trigger a Shared Peripheral Interrupt (SPI).
hv_gic_set_state
Set state for GIC device to be restored.
hv_gic_state_create
Create a GIC state object.
hv_gic_state_get_data
Get the state data for GIC.
hv_gic_state_get_size
Get size of buffer required for GIC state.
hv_sme_config_get_max_svl_bytes
Returns the value of the maximum Streaming Vector Length (SVL) in bytes.
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_sme_p_reg
Returns the value of a vCPU P predicate register in streaming SVE mode.
hv_vcpu_get_sme_state
Gets the current SME state consisting of the streaming SVE mode (PSTATE.SM) and ZA storage enable (PSTATE.ZA).
hv_vcpu_get_sme_z_reg
Returns the value of a vCPU Z vector register in streaming SVE mode.
hv_vcpu_get_sme_za_reg
Returns the value of the vCPU ZA matrix register in streaming SVE mode.
hv_vcpu_get_sme_zt0_reg
Returns the current value of the vCPU ZT0 register in streaming SVE mode.
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_sme_p_reg
Sets the value of a vCPU P predicate register in streaming SVE mode.
hv_vcpu_set_sme_state
Sets the SME state consisting of the streaming SVE mode and ZA storage enable.
hv_vcpu_set_sme_z_reg
Sets the value of a vCPU Z vector register in streaming SVE mode.
hv_vcpu_set_sme_za_reg
Sets the value of the vCPU ZA matrix register in streaming SVE mode.
hv_vcpu_set_sme_zt0_reg
Sets the value of the vCPU ZT0 register in streaming SVE mode.
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_allocate
Allocates anonymous memory suitable to be mapped as guest memory.
hv_vm_config_create
Creates a virtual machine configuration object.
hv_vm_config_get_default_ipa_granule
Return the default intermediate physical address granule.
hv_vm_config_get_default_ipa_size
Return the default intermediate physical address bit length.
hv_vm_config_get_el2_enabled
Return whether or not EL2 is enabled for a VM configuration.
hv_vm_config_get_el2_supported
Return whether or not EL2 is supported on the current platform.
hv_vm_config_get_ipa_granule
Return the intermediate physical address granule size in virtual machine configuration.
hv_vm_config_get_ipa_size
Return intermediate physical address bit length in configuration.
hv_vm_config_get_max_ipa_size
Return the maximum intermediate physical address bit length.
hv_vm_config_set_el2_enabled
Set whether or not EL2 is enabled for a VM configuration.
hv_vm_config_set_ipa_granule
Set the intermediate physical address granule size in virtual machine configuration.
hv_vm_config_set_ipa_size
Set intermediate physical address bit length in virtual machine configuration.
hv_vm_create
Creates a VM instance for the current process.
hv_vm_deallocate
Deallocate memory previously allocated by hv_vm_allocate.
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.
os_release

Type Aliases§

hv_gic_config_t
Configuration for hv_gic_create.
hv_gic_state_t
GIC state for hv_gic_state_get_data and hv_gic_state_get_size
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_sme_zt0_uchar64_t
Type of the SME2 ZT0 register.
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.