diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index c263175ad..06adcf8cf 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -1046,7 +1046,7 @@ pub struct DeviceManager { // Counter to keep track of the consumed device IDs. device_id_cnt: Wrapping, - pci_segments: Vec, + pci_segments: Box<[PciSegment]>, #[cfg_attr(target_arch = "aarch64", allow(dead_code))] // MSI Interrupt Manager @@ -1402,7 +1402,7 @@ impl DeviceManager { iommu_device: None, iommu_mapping: None, iommu_attached_devices: None, - pci_segments, + pci_segments: pci_segments.into_boxed_slice(), device_tree, exit_evt, reset_evt, @@ -4526,7 +4526,7 @@ impl DeviceManager { .map(|ic| ic.clone() as Arc>) } - pub(crate) fn pci_segments(&self) -> &Vec { + pub(crate) fn pci_segments(&self) -> &[PciSegment] { &self.pci_segments }