vmm: memory_manager: Own the system allocator

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-03-16 18:58:23 +01:00
committed by Rob Bradford
parent ef2b11ee6c
commit b584ec3fb3
3 changed files with 36 additions and 43 deletions

View File

@@ -549,7 +549,6 @@ impl DeviceManager {
pub fn new(
vm_fd: Arc<VmFd>,
config: Arc<Mutex<VmConfig>>,
allocator: Arc<Mutex<SystemAllocator>>,
memory_manager: Arc<Mutex<MemoryManager>>,
_exit_evt: &EventFd,
reset_evt: &EventFd,
@@ -564,7 +563,7 @@ impl DeviceManager {
let mut cmdline_additions = Vec::new();
let address_manager = Arc::new(AddressManager {
allocator,
allocator: memory_manager.lock().unwrap().allocator(),
io_bus: Arc::new(devices::Bus::new()),
mmio_bus: Arc::new(devices::Bus::new()),
vm_fd: vm_fd.clone(),