From 3dbae423bb8531b6c2d7813e8aea4777bb5a08f8 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 29 Jan 2020 15:32:29 +0000 Subject: [PATCH] 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 --- vmm/src/device_manager.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 5082f64f0..564673749 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -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)