Repository navigation
Releases
Releases · sauravsc/hypervisor-rs
v0.1.1
hypervisor 0.1.0
This is the first release in ten years. It adds Apple silicon support, moves to a modern toolchain, and fixes the Intel API.
Highlights
- Apple silicon (arm64) support through a safe API:
Vmis the per-process VM.GuestMemoryis page-aligned memory that stays mapped for its whole lifetime.Vcpuis!Send, because a vCPU belongs to the thread that created it.VcpuHandlestops a vCPU from any thread.- Also covered: GPR, SIMD&FP and system registers, exit and exception decoding (hvc/brk, MMIO data aborts, trapped sysregs), IRQ/FIQ injection, debug traps, the virtual timer and
VcpuConfig.
- Intel API kept (x86_64 only), with every call returning
Result(#2). - Entitlement support:
entitlements.plistandscripts/run-signed.shsign binaries withcom.apple.security.hypervisor. The repo uses the script as its cargo runner. - Examples for both architectures (#1), plus runtime tests that run real guests on Apple silicon. CI also runs the Intel example and test on a VT-x runner.
- Edition 2024, MSRV 1.85, GitHub Actions CI, and documentation on docs.rs.
Breaking changes
- Functions return
Result<T, hypervisor::Error>.Errorno longer has aSuccessvariant, and its variants were renamed (BadArgument,NoResources,NoDevice,Unsupported,Generic). map_memisunsafe.- The Intel API only exists when building for
x86_64.
Fixes
vCPU::write_msrwrote a pointer instead of the value into the MSR.
Thanks
- @stlankes for #2 (Result-based error handling and warning fixes), and for helping in #1.
- @orklann for #1, which led to the examples.
See CHANGELOG.md for details.