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

Method create_hypervisor_vm

vmm/src/vm.rs:1435–1452  ·  view source on GitHub ↗
(
        hypervisor: &dyn hypervisor::Hypervisor,
        config: HypervisorVmConfig,
    )

Source from the content-addressed store, hash-verified

1433 }
1434
1435 pub fn create_hypervisor_vm(
1436 hypervisor: &dyn hypervisor::Hypervisor,
1437 config: HypervisorVmConfig,
1438 ) -> Result<Arc<dyn hypervisor::Vm>> {
1439 hypervisor.check_required_extensions().unwrap();
1440
1441 let vm = hypervisor.create_vm(config).unwrap();
1442
1443 #[cfg(target_arch = "x86_64")]
1444 {
1445 vm.set_identity_map_address(KVM_IDENTITY_MAP_START.0)
1446 .unwrap();
1447 vm.set_tss_address(KVM_TSS_START.0 as usize).unwrap();
1448 vm.enable_split_irq().unwrap();
1449 }
1450
1451 Ok(vm)
1452 }
1453
1454 fn load_initramfs(&mut self, guest_mem: &GuestMemoryMmap) -> Result<arch::InitramfsConfig> {
1455 let initramfs = self.initramfs.as_mut().unwrap();

Callers

nothing calls this directly

Calls 5

create_vmMethod · 0.45
set_tss_addressMethod · 0.45
enable_split_irqMethod · 0.45

Tested by

no test coverage detected