File tree Expand file tree Collapse file tree 5 files changed +14
-15
lines changed
Expand file tree Collapse file tree 5 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ vmx = []
1313[dependencies ]
1414anyhow = {version = " 1.0" , default-features = false }
1515cfg-if = " 1.0"
16+ fdt-parser = " 0.5"
17+ lazyinit = " 0.2"
1618log = " 0.4"
1719spin = " 0.10"
1820timer_list = " 0.1"
19- fdt-parser = " 0.5"
20- lazyinit = " 0.2"
2121
2222# System independent crates provided by ArceOS.
2323axerrno = " 0.1.0"
@@ -34,13 +34,11 @@ axaddrspace = "0.2"
3434# axdevice_base = "0.1"
3535# axvcpu = "0.1"
3636axvmconfig = {version = " 0.1" , default-features = false }
37-
37+ axconfig = { workspace = true }
3838axhal.workspace = true
3939axruntime.workspace = true
4040axtask.workspace = true
4141
42-
43-
4442[target .'cfg(target_arch = "x86_64")' .dependencies ]
4543# x86_vcpu = "0.1"
4644
@@ -54,6 +52,6 @@ arm_vcpu = "0.1"
5452# arm_vgic = {version = "0.1", features = ["vgicv3"]}
5553
5654[patch .crates-io ]
55+ arm_vcpu = {git = " https://github.com/arceos-hypervisor/arm_vcpu" , branch = " next" }
5756axvcpu = {git = " https://github.com/arceos-hypervisor/axvcpu.git" , branch = " next" }
5857axvmconfig = {git = " https://github.com/arceos-hypervisor/axvmconfig.git" , branch = " next" }
59- arm_vcpu = {git = " https://github.com/arceos-hypervisor/arm_vcpu" , branch = " next" }
Original file line number Diff line number Diff line change @@ -71,4 +71,4 @@ impl arm_vcpu::CpuHal for VCpuHal {
7171 fn inject_interrupt ( & self , irq : usize ) {
7272 todo ! ( )
7373 }
74- }
74+ }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ extern crate log;
1616#[ macro_use]
1717extern crate anyhow;
1818
19- const TASK_STACK_SIZE : usize = 0x4000 ; // 16KB
19+ const TASK_STACK_SIZE : usize = 0x40000 ; // 16KB
2020
2121#[ cfg_attr( target_arch = "aarch64" , path = "arch/aarch64/mod.rs" ) ]
2222#[ cfg_attr( target_arch = "x86_64" , path = "arch/x86_64/mod.rs" ) ]
Original file line number Diff line number Diff line change 2121// } else if #[cfg(target_arch = "aarch64")] {
2222// pub use arm_vcpu::Aarch64VCpu as AxArchVCpuImpl;
2323// pub use arm_vcpu::Aarch64PerCpu as AxVMArchPerCpuImpl;
24- //
25- // pub use arm_vcpu::Aarch64VCpuCreateConfig as AxVCpuCreateConfig;
24+ //
25+ // pub use arm_vcpu::Aarch64VCpuCreateConfig as AxVCpuCreateConfig;
2626// pub use arm_vcpu::Aarch64VCpuSetupConfig as AxVCpuSetupConfig;
2727// pub use arm_vcpu::has_hardware_support;
2828
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ use core::{
66} ;
77
88use axtask:: AxCpuMask ;
9-
9+ use axconfig :: TASK_STACK_SIZE ;
1010use crate :: {
11- TASK_STACK_SIZE ,
11+
1212 arch:: { CpuData , Hal } ,
1313 vhal:: precpu:: PreCpuSet ,
1414} ;
@@ -27,7 +27,6 @@ pub fn init() -> anyhow::Result<()> {
2727
2828 info ! ( "Initializing VHal for {cpu_count} CPUs..." ) ;
2929 PRE_CPU . init ( ) ;
30-
3130 for cpu_id in 0 ..cpu_count {
3231 let id = CpuId :: new ( cpu_id) ;
3332 let _handle = axtask:: spawn_raw (
@@ -48,7 +47,7 @@ pub fn init() -> anyhow::Result<()> {
4847 format ! ( "init-cpu-{}" , cpu_id) ,
4948 TASK_STACK_SIZE ,
5049 ) ;
51- // _handle.join( );
50+ // handles.push(_handle );
5251 }
5352 info ! ( "Waiting for all cores to enable hardware virtualization..." ) ;
5453
@@ -57,7 +56,9 @@ pub fn init() -> anyhow::Result<()> {
5756 // Use `yield_now` instead of `core::hint::spin_loop` to avoid deadlock.
5857 axtask:: yield_now ( ) ;
5958 }
60-
59+ // for handle in handles {
60+ // handle.join();
61+ // }
6162 info ! ( "All cores have enabled hardware virtualization support." ) ;
6263 Ok ( ( ) )
6364}
You can’t perform that action at this time.
0 commit comments