(&mut self)
| 4063 | } |
| 4064 | |
| 4065 | fn add_vfio_devices(&mut self) -> DeviceManagerResult<Vec<PciBdf>> { |
| 4066 | let mut iommu_attached_device_ids = Vec::new(); |
| 4067 | let mut devices = self.config.lock().unwrap().devices.take(); |
| 4068 | |
| 4069 | if let Some(device_list_cfg) = &mut devices { |
| 4070 | for device_cfg in device_list_cfg.iter_mut() { |
| 4071 | let (device_id, _) = self.add_passthrough_device(device_cfg)?; |
| 4072 | if device_cfg.pci_common.iommu && self.iommu_device.is_some() { |
| 4073 | iommu_attached_device_ids.push(device_id); |
| 4074 | } |
| 4075 | } |
| 4076 | } |
| 4077 | |
| 4078 | // Update the list of devices |
| 4079 | self.config.lock().unwrap().devices = devices; |
| 4080 | |
| 4081 | Ok(iommu_attached_device_ids) |
| 4082 | } |
| 4083 | |
| 4084 | fn add_vfio_user_device( |
| 4085 | &mut self, |
no test coverage detected