https://github.com/rwth-os/xhypervisor
Rust API to the OS X Hypervisor framework for hardware-accelerated virtualization
https://github.com/rwth-os/xhypervisor
hypervisor macos osx virtualization x86-64
Last synced: 4 months ago
JSON representation
Rust API to the OS X Hypervisor framework for hardware-accelerated virtualization
- Host: GitHub
- URL: https://github.com/rwth-os/xhypervisor
- Owner: RWTH-OS
- License: mit
- Created: 2019-12-27T14:02:00.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T08:01:21.000Z (11 months ago)
- Last Synced: 2025-05-06T10:19:55.342Z (9 months ago)
- Topics: hypervisor, macos, osx, virtualization, x86-64
- Language: Rust
- Homepage:
- Size: 109 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# xhypervisor
[](https://crates.io/crates/xhypervisor)
[](https://docs.rs/xhypervisor)
[](https://img.shields.io/crates/l/xhypervisor.svg)
`xhypervisor` is a Rust library that taps into functionality that enables hardware-accelerated execution of virtual machines on OS X.
It is a fork of [hypervisor-rs](https://github.com/saurvs/hypervisor-rs) and modified for the development of [uhyve](https://github.com/hermit-os/uhyve).
Derived from [ahv](https://github.com/Thog/ahv), we added the support of Apple's Hypervisor Framework on Apple Silicon.
It binds to the [Hypervisor](https://developer.apple.com/documentation/hypervisor) framework on OS X, and exposes a safe Rust interface through the `hypervisor` module, and an unsafe foreign function interface through the `xhypervisor::ffi` module.
## Prerequisites
To use this library, you need
* macOS 10, or newer
* An Intel processor with the VT-x feature or an Apple Silicon processor with virtualization support. To verify this, run and expect the
following in your Terminal:
```shell
$ sysctl kern.hv_support
kern.hv_support: 1
```
## Status
- [x] Accessing x86 registers
- [x] Accessing aarch64 registers
- [x] Mapping guest physical memory segments into guest physical address space
- [x] x86: Accessing fields of Virtual Machine Control Structures (VMCS)
- [x] Virtual x86 CPUs
- [x] Executing and interrupting
- [x] Force flushing cached state
- [x] Invalidating translation lookaside buffer (TLB)
- [x] Accessing floating point (FP) and SIMD state
- [x] Obtaining cumulative execution time
- [x] Synchronizing guest timestamp-counters (TSC)
- [x] Accessing model-specific registers (MSRs)
- [x] Virtual aarch64 CPUs
- [x] Executing and interrupting
- [x] GICv3 support (requires macOS 15, or newer)