From 8ecf7369826d439a4c901dc64fb36c7cb6cbac1f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 10 Jan 2020 16:09:23 +0000 Subject: [PATCH] vmm: device_manager: Add the MemoryManager to the I/O bus Now that the MemoryManager has I/O port functionality it needs to be exposed on the I/O bus. Signed-off-by: Rob Bradford --- vmm/src/device_manager.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index ee694cc0a..d83d5eb3a 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -500,6 +500,18 @@ impl DeviceManager { let config = vm_info.vm_cfg.clone(); + address_manager + .allocator + .lock() + .unwrap() + .allocate_io_addresses(Some(GuestAddress(0x0a00)), 0x18, None) + .ok_or(DeviceManagerError::AllocateIOPort)?; + + address_manager + .io_bus + .insert(memory_manager.clone(), 0xa00, 0x18) + .map_err(DeviceManagerError::BusError)?; + Ok(DeviceManager { address_manager, console,