Skip to content

Commit f14b41c

Browse files
committed
Refactor VM and vCPU structures; remove unused HAL trait
- Deleted the `hal.rs` file and removed references to `AxVMHal` from `lib.rs`. - Consolidated VM ID handling into a new `VmId` struct in `vm.rs`, removing the duplicate definition in `vm2.rs`. - Introduced a `VmOps` trait for VM operations and a `Status` enum to represent VM states. - Removed the `AxVM` struct's internal implementation details, focusing on the public API for VM management. - Cleaned up the `vcpu.rs` file by commenting out unused architecture-specific code. - Reduced complexity in the `vm.rs` file by removing unnecessary fields and methods related to memory management.
1 parent 77357c2 commit f14b41c

File tree

7 files changed

+123
-1275
lines changed

7 files changed

+123
-1275
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vmx = []
1414
anyhow = {version = "1.0", default-features = false}
1515
cfg-if = "1.0"
1616
log = "0.4"
17-
spin = "0.9"
17+
spin = "0.10"
1818
axhal.workspace = true
1919
axruntime.workspace = true
2020
fdt-parser = "0.5"
@@ -26,25 +26,25 @@ cpumask = "0.1.0"
2626
memory_addr = "0.4"
2727
page_table_entry = {version = "0.5", features = ["arm-el2"]}
2828
page_table_multiarch = "0.5"
29-
percpu = {version = "0.2.0", features = ["arm-el2"]}
29+
# percpu = {version = "0.2.0", features = ["arm-el2"]}
3030

3131
# System dependent modules provided by ArceOS-Hypervisor.
3232
axaddrspace = "0.2"
33-
axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git"}
34-
axdevice_base = "0.1"
35-
axvcpu = "0.1"
33+
# axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git"}
34+
# axdevice_base = "0.1"
35+
# axvcpu = "0.1"
3636
axvmconfig = {version = "0.1", default-features = false}
3737

3838
[target.'cfg(target_arch = "x86_64")'.dependencies]
39-
x86_vcpu = "0.1"
39+
# x86_vcpu = "0.1"
4040

4141
[target.'cfg(target_arch = "riscv64")'.dependencies]
42-
riscv_vcpu = "0.1"
42+
# riscv_vcpu = "0.1"
4343

4444
[target.'cfg(target_arch = "aarch64")'.dependencies]
4545
aarch64-cpu-ext = "0.1"
4646
arm_vcpu = "0.1"
47-
arm_vgic = {version = "0.1", features = ["vgicv3"]}
47+
# arm_vgic = {version = "0.1", features = ["vgicv3"]}
4848

4949
[patch.crates-io]
5050
axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"}

0 commit comments

Comments
 (0)