mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Enable memory manager for AArch64
Screened IO space as it is not available on AArch64. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Rob Bradford
parent
eeeb45bbb9
commit
b5f1c912d6
@@ -37,7 +37,9 @@ use std::os::unix::thread::JoinHandleExt;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Barrier, Mutex};
|
||||
use std::{cmp, io, result, thread};
|
||||
use vm_memory::{GuestAddress, GuestMemoryAtomic, GuestMemoryMmap};
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
use vm_memory::GuestAddress;
|
||||
use vm_memory::{GuestMemoryAtomic, GuestMemoryMmap};
|
||||
use vm_migration::{
|
||||
Migratable, MigratableError, Pausable, Snapshot, SnapshotDataSection, Snapshottable,
|
||||
Transportable,
|
||||
@@ -675,6 +677,7 @@ impl CpuManager {
|
||||
vcpus: Vec::with_capacity(usize::from(config.max_vcpus)),
|
||||
}));
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
device_manager
|
||||
.allocator()
|
||||
.lock()
|
||||
|
||||
@@ -302,8 +302,10 @@ impl MemoryManager {
|
||||
// Both MMIO and PIO address spaces start at address 0.
|
||||
let allocator = Arc::new(Mutex::new(
|
||||
SystemAllocator::new(
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
GuestAddress(0),
|
||||
1 << 16 as GuestUsize,
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
(1 << 16 as GuestUsize),
|
||||
GuestAddress(0),
|
||||
mmio_address_space_size(),
|
||||
layout::MEM_32BIT_DEVICES_START,
|
||||
|
||||
Reference in New Issue
Block a user