(&mut self, disk_cfg: &mut DiskConfig)
| 5059 | } |
| 5060 | |
| 5061 | pub fn add_disk(&mut self, disk_cfg: &mut DiskConfig) -> DeviceManagerResult<PciDeviceInfo> { |
| 5062 | self.validate_identifier(&disk_cfg.pci_common.id)?; |
| 5063 | |
| 5064 | if disk_cfg.pci_common.iommu && !self.is_iommu_segment(disk_cfg.pci_common.pci_segment) { |
| 5065 | return Err(DeviceManagerError::InvalidIommuHotplug); |
| 5066 | } |
| 5067 | |
| 5068 | let device = self.make_virtio_block_device(disk_cfg, true)?; |
| 5069 | self.hotplug_virtio_pci_device(device) |
| 5070 | } |
| 5071 | |
| 5072 | pub fn add_fs(&mut self, fs_cfg: &mut FsConfig) -> DeviceManagerResult<PciDeviceInfo> { |
| 5073 | self.validate_identifier(&fs_cfg.pci_common.id)?; |
nothing calls this directly
no test coverage detected