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_dataandhv_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.