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

Method create_passthrough_device

hypervisor/src/kvm/mod.rs:1240–1249  ·  view source on GitHub ↗

Create a device that is used for passthrough

(&self)

Source from the content-addressed store, hash-verified

1238
1239 /// Create a device that is used for passthrough
1240 fn create_passthrough_device(&self) -> vm::Result<VfioDeviceFd> {
1241 let mut vfio_dev = kvm_create_device {
1242 type_: kvm_device_type_KVM_DEV_TYPE_VFIO,
1243 fd: 0,
1244 flags: 0,
1245 };
1246
1247 self.create_device(&mut vfio_dev)
1248 .map_err(|e| vm::HypervisorVmError::CreatePassthroughDevice(e.into()))
1249 }
1250
1251 ///
1252 /// Start logging dirty pages

Callers 1

Calls 1

create_deviceMethod · 0.45

Tested by

no test coverage detected