vmm: Add MMIO & PIO config devices for all PCI segments

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-10-05 15:00:23 +01:00
parent 4f5c179b9b
commit c886d71d29

View File

@ -1188,14 +1188,16 @@ impl DeviceManager {
} }
} }
#[cfg(target_arch = "x86_64")] for segment in &self.pci_segments {
self.bus_devices.push( #[cfg(target_arch = "x86_64")]
Arc::clone(self.pci_segments[0].pci_config_io.as_ref().unwrap()) if let Some(pci_config_io) = segment.pci_config_io.as_ref() {
as Arc<Mutex<dyn BusDevice>>, self.bus_devices
); .push(Arc::clone(pci_config_io) as Arc<Mutex<dyn BusDevice>>);
}
self.bus_devices self.bus_devices
.push(Arc::clone(&self.pci_segments[0].pci_config_mmio) as Arc<Mutex<dyn BusDevice>>); .push(Arc::clone(&segment.pci_config_mmio) as Arc<Mutex<dyn BusDevice>>);
}
Ok(()) Ok(())
} }