Skip to content

Commit 97c3433

Browse files
committed
docs: reorganize guest documentation into config and manager sections
1 parent b8cdbae commit 97c3433

File tree

15 files changed

+1235
-781
lines changed

15 files changed

+1235
-781
lines changed

docs/design/build/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "构建系统",
3-
"position": 4,
3+
"position": 5,
44
"link": {
55
"type": "generated-index",
66
"slug": "/category/design/build"

docs/design/devicetree/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "设备树支持",
3-
"position": 3,
3+
"position": 4,
44
"collapsed": false,
55
"link": {
66
"type": "generated-index",
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"label": "客户机配置",
3-
"position": 3,
3+
"position": 2,
44
"link": {
55
"type": "generated-index",
6-
"slug": "/category/design/guest/config"
6+
"slug": "/category/design/guest-config"
77
}
88
}

docs/design/guest/config/config-loading.md renamed to docs/design/guest-config/config-loading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ serde 自动生成所有解析代码,无需手写 `if let Some(id) = toml["id"
373373
不同类型在解析过程中的转换:
374374

375375
| TOML 值 | 中间类型 | 最终类型 |
376-
|---------|---------|---------|
376+
|-------|-------|-------|
377377
| `1` | `usize` | `usize` |
378378
| `"linux-qemu"` | `String` | `String` |
379379
| `0x8020_0000` | `usize` | `GuestPhysAddr` |
@@ -414,7 +414,7 @@ flowchart TB
414414

415415
这个层次图展示了验证过程的递进关系,每层依赖于前一层的成功:
416416

417-
**Layer 1:TOML 语法验证**(由 toml crate 自动完成)
417+
**Layer 1:TOML 语法验证**(由 `toml` crate 自动完成)
418418
- **词法分析**
419419
- 识别 token:标识符、等号、方括号、数字、字符串等
420420
- 检测非法字符和不完整的 token
File renamed without changes.

docs/design/guest/config/config-toml-format.md renamed to docs/design/guest-config/config-toml-format.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ graph TB
3838

3939
| 字段 | 类型 | 说明 | 示例 |
4040
|------|------|------|------|
41-
| `id` | usize | VM 唯一标识符(0-255) | `1` |
42-
| `name` | String | VM 名称,用于日志显示 | `"linux-qemu"` |
43-
| `vm_type` | u8 | 虚拟化类型,1 = 完全虚拟化 | `1` |
44-
| `cpu_num` | usize | Vcpu 数量 | `4` |
41+
| `id` | `usize` | VM 唯一标识符(0-255) | `1` |
42+
| `name` | `String` | VM 名称,用于日志显示 | `"linux-qemu"` |
43+
| `vm_type` | `u8` | 虚拟化类型,1 = 完全虚拟化 | `1` |
44+
| `cpu_num` | `usize` | Vcpu 数量 | `4` |
4545

4646
### 可选字段
4747

4848
| 字段 | 类型 | 说明 | 示例 |
4949
|------|------|------|------|
50-
| `phys_cpu_ids` | Vec\<usize\> | 物理 CPU MPIDR 值(ARM) | `[0x0, 0x100]` |
50+
| `phys_cpu_ids` | `Vec<usize>` | 物理 CPU MPIDR 值(ARM) | `[0x0, 0x100]` |
5151

5252
### 配置示例
5353

@@ -97,22 +97,22 @@ graph LR
9797

9898
| 字段 | 类型 | 说明 |
9999
|------|------|------|
100-
| `entry_point` | usize | 内核入口地址(GPA) |
101-
| `kernel_path` | String | 内核镜像路径 |
102-
| `kernel_load_addr` | usize | 内核加载地址(GPA) |
103-
| `memory_regions` | Array | 内存区域配置 |
100+
| `entry_point` | `usize` | 内核入口地址(GPA) |
101+
| `kernel_path` | `String` | 内核镜像路径 |
102+
| `kernel_load_addr` | `usize` | 内核加载地址(GPA) |
103+
| `memory_regions` | `Array` | 内存区域配置 |
104104

105105
### 可选字段
106106

107107
| 字段 | 类型 | 说明 |
108108
|------|------|------|
109-
| `image_location` | String | 镜像位置:"memory" 或 "fs" |
110-
| `dtb_path` | String | DTB 文件路径 |
111-
| `dtb_load_addr` | usize | DTB 加载地址 |
112-
| `bios_path` | String | BIOS/UEFI 文件路径 |
113-
| `bios_load_addr` | usize | BIOS 加载地址 |
114-
| `ramdisk_path` | String | Ramdisk 文件路径 |
115-
| `ramdisk_load_addr` | usize | Ramdisk 加载地址 |
109+
| `image_location` | `String` | 镜像位置:"memory" 或 "fs" |
110+
| `dtb_path` | `String` | DTB 文件路径 |
111+
| `dtb_load_addr` | `usize` | DTB 加载地址 |
112+
| `bios_path` | `String` | BIOS/UEFI 文件路径 |
113+
| `bios_load_addr` | `usize` | BIOS 加载地址 |
114+
| `ramdisk_path` | `String` | Ramdisk 文件路径 |
115+
| `ramdisk_load_addr` | `usize` | Ramdisk 加载地址 |
116116

117117
### 配置示例
118118

@@ -176,11 +176,11 @@ graph TB
176176

177177
| 字段 | 类型 | 说明 |
178178
|------|------|------|
179-
| `emu_devices` | Array | 模拟设备列表 |
180-
| `passthrough_devices` | Array | 直通设备列表 |
181-
| `excluded_devices` | Array | 排除设备列表 |
182-
| `passthrough_addresses` | Array | 直通地址列表 |
183-
| `interrupt_mode` | String | 中断模式 |
179+
| `emu_devices` | `Array` | 模拟设备列表 |
180+
| `passthrough_devices` | `Array` | 直通设备列表 |
181+
| `excluded_devices` | `Array` | 排除设备列表 |
182+
| `passthrough_addresses` | `Array` | 直通地址列表 |
183+
| `interrupt_mode` | `String` | 中断模式 |
184184

185185
### 中断模式
186186

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"position": 3,
44
"link": {
55
"type": "generated-index",
6-
"slug": "/category/design/guest/manager"
6+
"slug": "/category/design/guest-manager"
77
}
88
}

0 commit comments

Comments
 (0)