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 <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-10 16:09:23 +00:00 committed by Samuel Ortiz
parent 1218765df2
commit 8ecf736982

View File

@ -500,6 +500,18 @@ impl DeviceManager {
let config = vm_info.vm_cfg.clone(); 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 { Ok(DeviceManager {
address_manager, address_manager,
console, console,