Crate hypervisor

source ·
Expand description

This is a Rust library that enables hardware-accelerated execution of virtual machines on OS X.

It binds to the Hypervisor framework on OS X, and exposes a safe Rust interface through the hypervisor module, and an unsafe foreign function interface through the hypervisor::ffi module.

To use this library, you need

  • OS X Yosemite (10.10), or newer

  • an Intel processor with the VT-x feature set that includes Extended Page Tables (EPT) and Unrestricted Mode. To verify this, run and expect the following in your Terminal:

    $ sysctl kern.hv_support
    kern.hv_support: 1
    

!

Modules§

  • Bindings to the Hypervisor Framework

Structs§

Enums§

  • Error returned after every call
  • Guest physical memory region permissions
  • VMX cabability
  • x86 architectural register

Functions§

  • Creates a VM instance for the current Mach task
  • Destroys the VM instance associated with the current Mach task
  • Forces an immediate VMEXIT of a set of vCPUs
  • Maps a region in the virtual address space of the current task into the guest physical address space of the virutal machine
  • Modifies the permissions of a region in the guest physical address space of the virtual machine
  • Reads a VMX capability of the host processor
  • Synchronizes the guest Timestamp-Counters (TSC) across all vCPUs
  • Unmaps a region in the guest physical address space of the virutal machine