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

Method add_vsock

vmm/src/device_manager.rs:5122–5131  ·  view source on GitHub ↗
(&mut self, vsock_cfg: &mut VsockConfig)

Source from the content-addressed store, hash-verified

5120 }
5121
5122 pub fn add_vsock(&mut self, vsock_cfg: &mut VsockConfig) -> DeviceManagerResult<PciDeviceInfo> {
5123 self.validate_identifier(&vsock_cfg.pci_common.id)?;
5124
5125 if vsock_cfg.pci_common.iommu && !self.is_iommu_segment(vsock_cfg.pci_common.pci_segment) {
5126 return Err(DeviceManagerError::InvalidIommuHotplug);
5127 }
5128
5129 let device = self.make_virtio_vsock_device(vsock_cfg)?;
5130 self.hotplug_virtio_pci_device(device)
5131 }
5132
5133 pub fn counters(&self) -> HashMap<String, HashMap<&'static str, Wrapping<u64>>> {
5134 let mut counters = HashMap::new();

Callers

nothing calls this directly

Calls 4

is_iommu_segmentMethod · 0.80
validate_identifierMethod · 0.45

Tested by

no test coverage detected