diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index 6ef835bcd..88c44d623 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -113,6 +113,9 @@ pub enum Error { /// Cannot add legacy device to Bus. BusError(devices::BusError), + + /// Failed to allocate IO port + AllocateIOPort, } pub type Result = result::Result; @@ -405,6 +408,13 @@ impl CpuManager { selected_cpu: 0, })); + device_manager + .allocator() + .lock() + .unwrap() + .allocate_io_addresses(Some(GuestAddress(0x0cd8)), 0x8, None) + .ok_or(Error::AllocateIOPort)?; + cpu_manager .lock() .unwrap()