@@ -2,6 +2,7 @@ use alloc::boxed::Box;
22use alloc:: format;
33use alloc:: sync:: Arc ;
44use alloc:: vec:: Vec ;
5+ #[ cfg( target_arch = "aarch64" ) ]
56use axvmconfig:: VMInterruptMode ;
67use core:: sync:: atomic:: { AtomicBool , Ordering } ;
78use memory_addr:: { align_down_4k, align_up_4k} ;
@@ -12,6 +13,10 @@ use spin::Mutex;
1213use axaddrspace:: { AddrSpace , GuestPhysAddr , HostPhysAddr , MappingFlags , device:: AccessWidth } ;
1314use axdevice:: { AxVmDeviceConfig , AxVmDevices } ;
1415use axvcpu:: { AxVCpu , AxVCpuExitReason , AxVCpuHal } ;
16+
17+ #[ cfg( target_arch = "riscv64" ) ]
18+ use axvcpu:: AxArchVCpu ;
19+
1520use cpumask:: CpuMask ;
1621
1722use crate :: config:: { AxVMConfig , VmMemMappingType } ;
@@ -220,12 +225,18 @@ impl<H: AxVMHal, U: AxVCpuHal> AxVM<H, U> {
220225 ) ?;
221226 }
222227
228+ #[ cfg( target_arch = "aarch64" ) ]
223229 let mut devices = axdevice:: AxVmDevices :: new ( AxVmDeviceConfig {
224230 emu_configs : config. emu_devices ( ) . to_vec ( ) ,
225231 } ) ;
226-
232+ # [ cfg ( target_arch = "aarch64" ) ]
227233 let passthrough = config. interrupt_mode ( ) == VMInterruptMode :: Passthrough ;
228234
235+ #[ cfg( not( target_arch = "aarch64" ) ) ]
236+ let devices = axdevice:: AxVmDevices :: new ( AxVmDeviceConfig {
237+ emu_configs : config. emu_devices ( ) . to_vec ( ) ,
238+ } ) ;
239+
229240 #[ cfg( target_arch = "aarch64" ) ]
230241 {
231242 if passthrough {
0 commit comments