(&mut self, net_cfg: &mut NetConfig)
| 5098 | } |
| 5099 | |
| 5100 | pub fn add_net(&mut self, net_cfg: &mut NetConfig) -> DeviceManagerResult<PciDeviceInfo> { |
| 5101 | self.validate_identifier(&net_cfg.pci_common.id)?; |
| 5102 | |
| 5103 | if net_cfg.pci_common.iommu && !self.is_iommu_segment(net_cfg.pci_common.pci_segment) { |
| 5104 | return Err(DeviceManagerError::InvalidIommuHotplug); |
| 5105 | } |
| 5106 | |
| 5107 | let device = self.make_virtio_net_device(net_cfg)?; |
| 5108 | self.hotplug_virtio_pci_device(device) |
| 5109 | } |
| 5110 | |
| 5111 | pub fn add_vdpa(&mut self, vdpa_cfg: &mut VdpaConfig) -> DeviceManagerResult<PciDeviceInfo> { |
| 5112 | self.validate_identifier(&vdpa_cfg.pci_common.id)?; |
nothing calls this directly
no test coverage detected