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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! # arcbox-vmm
//!
//! Host-side Virtual Machine Monitor (VMM) for `ArcBox`.
//!
//! This is the **primary** VM stack, used by `arcbox-core` to boot and manage
//! the Linux guest. Platform-specific backends live in submodules:
//!
//! - **macOS**: Virtualization.framework (managed execution)
//! - **Linux**: KVM (manual vCPU execution)
//!
//! For the guest-side Firecracker sandbox stack, see `arcbox-vm`.
//!
//! # Key types
//!
//! - [`Vmm`]: VM lifecycle/state and device orchestration
//! - [`VmBuilder`]: Fluent API for VM configuration
//! - [`VcpuManager`]: Manages vCPU threads and execution
//! - [`MemoryManager`]: Memory allocation and mapping
//! - [`DeviceManager`]: Device registration and I/O handling
//! - [`KernelLoader`] and [`FdtBuilder`]: Boot image and device-tree setup
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────┐
//! │ VMM │
//! │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
//! │ │VcpuManager │ │MemoryManager│ │DeviceManager│ │
//! │ └────────────┘ └────────────┘ └────────────┘ │
//! │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
//! │ │ Boot │ │ FDT │ │ IRQ │ │
//! │ └────────────┘ └────────────┘ └────────────┘ │
//! └─────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────┐
//! │ arcbox-hypervisor │
//! └─────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────┐
//! │ arcbox-virtio │
//! └─────────────────────────┘
//! ```
//!
//! ## Example
//!
//! ```ignore
//! use arcbox_vmm::builder::VmBuilder;
//!
//! let vm = VmBuilder::new()
//! .name("my-vm")
//! .cpus(4)
//! .memory_gb(2)
//! .kernel("/path/to/vmlinux")
//! .cmdline("console=hvc0 root=/dev/vda")
//! .block_device("/path/to/disk.img", false)
//! .network_device(None, None)
//! .build()?;
//!
//! vm.run().await?;
//! ```
// Intentionally not `pub` — only used by darwin_hv to spawn the worker.
pub
pub
pub
/// Back-compat re-export of `arcbox_virtio::vsock_manager`.
///
/// The module moved to `arcbox-virtio` so that
/// `VirtioVsock::poll_rx_injection` can reach `RxOps` /
/// `VsockConnection` internals without `arcbox-virtio` depending on
/// `arcbox-vmm`. Existing `crate::vsock_manager::*` imports continue
/// to work via this shim.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;