Skip to content

Commit 0f3e8b3

Browse files
committed
chore: move vmm::vstate code under vmm::arch
Move the rest of vstate architecture-specific code under `vmm::arch`. Signed-off-by: Babis Chalios <[email protected]>
1 parent 56c573a commit 0f3e8b3

File tree

18 files changed

+571
-605
lines changed

18 files changed

+571
-605
lines changed

src/snapshot-editor/src/edit_vmstate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ mod tests {
9999
const KVM_REG_SIZE_U32: u64 = 0x20000000000000;
100100

101101
use vmm::arch::aarch64::regs::Aarch64RegisterRef;
102-
use vmm::vstate::vcpu::aarch64::VcpuState;
102+
use vmm::arch::aarch64::vcpu::VcpuState;
103103

104104
let vcpu_state = VcpuState {
105105
regs: {
@@ -158,7 +158,7 @@ mod tests {
158158
const KVM_REG_SIZE_U32: u64 = 0x20000000000000;
159159

160160
use vmm::arch::aarch64::regs::Aarch64RegisterRef;
161-
use vmm::vstate::vcpu::aarch64::VcpuState;
161+
use vmm::arch::aarch64::vcpu::VcpuState;
162162

163163
let vcpu_state = VcpuState {
164164
regs: {

src/vmm/src/arch/aarch64/vstate/kvm.rs renamed to src/vmm/src/arch/aarch64/kvm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ use crate::cpu_config::templates::KvmCapability;
1010
/// ['Kvm'] initialization can't fail for Aarch64
1111
pub type KvmArchError = Infallible;
1212

13-
/// Errors associated with the wrappers over KVM ioctls.
14-
/// Needs `rustfmt::skip` to make multiline comments work
1513
/// Optional capabilities.
1614
#[derive(Debug, Default)]
1715
pub struct OptionalCapabilities {

src/vmm/src/arch/aarch64/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ pub(crate) mod cache_info;
55
mod fdt;
66
/// Module for the global interrupt controller configuration.
77
pub mod gic;
8+
/// Architecture specific KVM-related code
9+
pub mod kvm;
810
/// Layout for this aarch64 system.
911
pub mod layout;
1012
/// Logic for configuring aarch64 registers.
1113
pub mod regs;
12-
/// Helper methods for VcpuFd.
14+
/// Architecture specific vCPU code
1315
pub mod vcpu;
14-
/// Architecture specific microVM state.
15-
pub mod vstate;
16+
/// Architecture specific VM state code
17+
pub mod vm;
1618

1719
use std::cmp::min;
1820
use std::collections::HashMap;

0 commit comments

Comments
 (0)