vmm: Move MemoryManager from I/O ports to MMIO region

Rather than have the MemoryManager device sit on the I/O bus allocate
space for MMIO and add it to the MMIO bus.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-01-23 11:15:15 +00:00
parent 3202e8ac7a
commit 03108fb88b
2 changed files with 38 additions and 16 deletions
+7 -8
View File
@@ -523,16 +523,15 @@ impl DeviceManager {
#[cfg(feature = "acpi")]
let memory_manager_clone = memory_manager.clone();
address_manager
.allocator
.lock()
.unwrap()
.allocate_io_addresses(Some(GuestAddress(0x0a00)), 0x18, None)
.ok_or(DeviceManagerError::AllocateIOPort)?;
let memory_manager_device_base = memory_manager.lock().unwrap().device_base();
address_manager
.io_bus
.insert(memory_manager, 0xa00, 0x18)
.mmio_bus
.insert(
memory_manager,
memory_manager_device_base.0,
MemoryManager::DEVICE_SIZE,
)
.map_err(DeviceManagerError::BusError)?;
Ok(DeviceManager {