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
//! # arcbox-vmm
//!
//! Virtual Machine Monitor (VMM) for `ArcBox`.
//!
//! This crate provides high-level VM management on top of the hypervisor
//! abstraction layer:
//!
//! - [`VmBuilder`]: Fluent API for VM configuration
//! - [`Vmm`]: VM lifecycle/state and device orchestration
//! - [`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?;
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;