vmm: Add support to DeviceManager for hotplugging network devices

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-03-23 16:18:10 +00:00 committed by Sebastien Boeuf
parent 42a9896fe4
commit 8f323e61d8

View File

@ -2072,6 +2072,12 @@ impl DeviceManager {
let (device, iommu_attached) = self.make_virtio_pmem_device(pmem_cfg)?;
self.hotplug_virtio_pci_device(device, iommu_attached)
}
#[cfg(feature = "pci_support")]
pub fn add_net(&mut self, net_cfg: &mut NetConfig) -> DeviceManagerResult<()> {
let (device, iommu_attached) = self.make_virtio_net_device(net_cfg)?;
self.hotplug_virtio_pci_device(device, iommu_attached)
}
}
#[cfg(feature = "acpi")]