1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Hypervisor.framework backend (macOS / arm64) — the primary target.
//!
//! Plan (Phase 1): create a VM via `hv_vm_create`, map `GuestMemory` with
//! `hv_vm_map`, create a vcpu with `hv_vcpu_create`, and run guest code at
//! EL1/EL0. A guest `svc #0` traps out as `HV_EXIT_REASON_EXCEPTION` with an
//! ESR indicating a system call; we decode that into `Exit::Syscall` and
//! return to the kernel. This is where the crate's only `unsafe` FFI lives.
//!
//! Compile-time stub until the FFI bindings land.
use crateArch;
use ;