1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

pub mod aarch64;
mod cpuid;
mod generic;
pub mod io;
pub mod irqcon;
pub mod state;
pub mod x86;

pub use arch::*;
pub use cpuid::*;
pub use generic::*;
pub use vm_topology::processor::VpInfo;

mod arch {
    #[cfg(guest_arch = "x86_64")]
    mod x86 {
        #![cfg_attr(not(guest_arch = "x86_64"), allow(unused_imports))]
        pub use crate::x86::vm;
        pub use crate::x86::vp;
        pub use crate::x86::X86InitialRegs as InitialRegs;
        pub use crate::x86::X86PartitionCapabilities as PartitionCapabilities;
    }
    #[cfg(guest_arch = "aarch64")]
    mod aarch64 {
        #![cfg_attr(not(guest_arch = "aarch64"), allow(unused_imports))]
        pub use crate::aarch64::vm;
        pub use crate::aarch64::vp;
        pub use crate::aarch64::Aarch64InitialRegs as InitialRegs;
        pub use crate::aarch64::Aarch64PartitionCapabilities as PartitionCapabilities;
    }

    #[cfg(guest_arch = "aarch64")]
    pub use aarch64::*;
    #[cfg(guest_arch = "x86_64")]
    pub use x86::*;
}