Skip to content

Commit 51e7c7d

Browse files
committed
refactor: deps git to crates-io
1 parent 93b8ee5 commit 51e7c7d

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ page_table_multiarch = "0.5"
2222
percpu = { version = "0.2.0", features = ["arm-el2"] }
2323

2424
# System dependent modules provided by ArceOS-Hypervisor.
25-
axvcpu = { git = "https://github.com/arceos-hypervisor/axvcpu.git" }
26-
axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace.git" }
25+
axvcpu = "0.1"
26+
axcpu = { version = "0.2", features = ["arm-el2"] }
27+
axaddrspace = "0.1"
2728
axdevice = { git = "https://github.com/arceos-hypervisor/axdevice.git" }
28-
axdevice_base = { git = "https://github.com/arceos-hypervisor/axdevice_crates.git" }
29-
axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", default-features = false }
29+
axdevice_base = "0.1"
30+
axvmconfig = { version = "0.1", default-features = false }
3031

3132
[target.'cfg(target_arch = "x86_64")'.dependencies]
32-
x86_vcpu = { git = "https://github.com/arceos-hypervisor/x86_vcpu.git" }
33+
x86_vcpu = "0.1"
3334

3435
[target.'cfg(target_arch = "riscv64")'.dependencies]
35-
riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu.git" }
36+
riscv_vcpu = "0.1"
3637

3738
[target.'cfg(target_arch = "aarch64")'.dependencies]
38-
arm_vcpu = { git = "https://github.com/arceos-hypervisor/arm_vcpu.git" }
39-
arm_vgic = { git = "https://github.com/arceos-hypervisor/arm_vgic.git", features = ["vgicv3"] }
39+
arm_vcpu = { git = "https://github.com/arceos-hypervisor/arm_vcpu", branch = "next-dev" }
40+
arm_vgic = { version = "0.1", features = ["vgicv3"] }
4041

src/vm.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use spin::Mutex;
1111

1212
use axaddrspace::{AddrSpace, GuestPhysAddr, HostPhysAddr, MappingFlags, device::AccessWidth};
1313
use axdevice::{AxVmDeviceConfig, AxVmDevices};
14-
use axvcpu::{AxArchVCpu, AxVCpu, AxVCpuExitReason, AxVCpuHal};
14+
use axvcpu::{AxVCpu, AxVCpuExitReason, AxVCpuHal};
1515
use cpumask::CpuMask;
1616

1717
use crate::config::{AxVMConfig, VmMemMappingType};
@@ -295,7 +295,7 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
295295
}
296296
#[cfg(not(target_arch = "aarch64"))]
297297
{
298-
<AxArchVCpuImpl<U> as AxArchVCpu>::SetupConfig::default()
298+
<AxArchVCpuImpl<U> as axvcpu::AxArchVCpu>::SetupConfig::default()
299299
}
300300
};
301301

@@ -435,15 +435,13 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
435435
reg_width: _,
436436
signed_ext: _,
437437
} => {
438-
let val = self
439-
.get_devices()
440-
.handle_mmio_read(*addr, (*width).into())?;
438+
let val = self.get_devices().handle_mmio_read(*addr, *width)?;
441439
vcpu.set_gpr(*reg, val);
442440
true
443441
}
444442
AxVCpuExitReason::MmioWrite { addr, width, data } => {
445443
self.get_devices()
446-
.handle_mmio_write(*addr, (*width).into(), *data as usize)?;
444+
.handle_mmio_write(*addr, *width, *data as usize)?;
447445
true
448446
}
449447
AxVCpuExitReason::IoRead { port, width } => {
@@ -591,7 +589,7 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
591589
)
592590
};
593591
let mut copied_bytes = 0;
594-
for (_i, chunk) in buffer.iter_mut().enumerate() {
592+
for chunk in buffer.iter_mut() {
595593
let end = copied_bytes + chunk.len();
596594
chunk.copy_from_slice(&bytes[copied_bytes..end]);
597595
copied_bytes += chunk.len();

0 commit comments

Comments
 (0)