vmm: device_manager: Only add MemoryManager to I/O bus on ACPI builds

The MemoryManager should only be included on the I/O bus when doing ACPI
builds as that is the only time it will be interrogated.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-29 15:32:29 +00:00
parent 68fa97eb0e
commit 3dbae423bb

View File

@ -519,6 +519,7 @@ impl DeviceManager {
#[cfg(feature = "acpi")]
let config = vm_info.vm_cfg.clone();
#[cfg(feature = "acpi")]
address_manager
.allocator
.lock()
@ -526,6 +527,7 @@ impl DeviceManager {
.allocate_io_addresses(Some(GuestAddress(0x0a00)), 0x18, None)
.ok_or(DeviceManagerError::AllocateIOPort)?;
#[cfg(feature = "acpi")]
address_manager
.io_bus
.insert(_memory_manager.clone(), 0xa00, 0x18)