MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / add_pmem

Method add_pmem

vmm/src/device_manager.rs:5089–5098  ·  view source on GitHub ↗
(&mut self, pmem_cfg: &mut PmemConfig)

Source from the content-addressed store, hash-verified

5087 }
5088
5089 pub fn add_pmem(&mut self, pmem_cfg: &mut PmemConfig) -> DeviceManagerResult<PciDeviceInfo> {
5090 self.validate_identifier(&pmem_cfg.pci_common.id)?;
5091
5092 if pmem_cfg.pci_common.iommu && !self.is_iommu_segment(pmem_cfg.pci_common.pci_segment) {
5093 return Err(DeviceManagerError::InvalidIommuHotplug);
5094 }
5095
5096 let device = self.make_virtio_pmem_device(pmem_cfg)?;
5097 self.hotplug_virtio_pci_device(device)
5098 }
5099
5100 pub fn add_net(&mut self, net_cfg: &mut NetConfig) -> DeviceManagerResult<PciDeviceInfo> {
5101 self.validate_identifier(&net_cfg.pci_common.id)?;

Callers

nothing calls this directly

Calls 4

is_iommu_segmentMethod · 0.80
validate_identifierMethod · 0.45

Tested by

no test coverage detected