(
hypervisor: &dyn hypervisor::Hypervisor,
config: HypervisorVmConfig,
)
| 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(); |
nothing calls this directly
no test coverage detected