Skip to content

Commit 61497b0

Browse files
committed
fix task_stack_size
1 parent 5b74a37 commit 61497b0

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ vmx = []
1313
[dependencies]
1414
anyhow = {version = "1.0", default-features = false}
1515
cfg-if = "1.0"
16+
fdt-parser = "0.5"
17+
lazyinit = "0.2"
1618
log = "0.4"
1719
spin = "0.10"
1820
timer_list = "0.1"
19-
fdt-parser = "0.5"
20-
lazyinit = "0.2"
2121

2222
# System independent crates provided by ArceOS.
2323
axerrno = "0.1.0"
@@ -34,13 +34,11 @@ axaddrspace = "0.2"
3434
# axdevice_base = "0.1"
3535
# axvcpu = "0.1"
3636
axvmconfig = {version = "0.1", default-features = false}
37-
37+
axconfig = {workspace = true}
3838
axhal.workspace = true
3939
axruntime.workspace = true
4040
axtask.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"}
5756
axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"}
5857
axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"}
59-
arm_vcpu = {git = "https://github.com/arceos-hypervisor/arm_vcpu", branch = "next"}

src/arch/aarch64/cpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ impl arm_vcpu::CpuHal for VCpuHal {
7171
fn inject_interrupt(&self, irq: usize) {
7272
todo!()
7373
}
74-
}
74+
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extern crate log;
1616
#[macro_use]
1717
extern 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")]

src/vcpu.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
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

src/vhal/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use core::{
66
};
77

88
use axtask::AxCpuMask;
9-
9+
use axconfig::TASK_STACK_SIZE;
1010
use 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
}

0 commit comments

Comments
 (0)