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

Method sev_snp_init

hypervisor/src/kvm/mod.rs:697–707  ·  view source on GitHub ↗
(&self, guest_policy: igvm_defs::SnpPolicy)

Source from the content-addressed store, hash-verified

695impl vm::Vm for KvmVm {
696 #[cfg(all(feature = "sev_snp", target_arch = "x86_64"))]
697 fn sev_snp_init(&self, guest_policy: igvm_defs::SnpPolicy) -> vm::Result<()> {
698 self.sev_fd
699 .as_ref()
700 .unwrap()
701 .launch_start(&self.fd, guest_policy)
702 .map_err(|e| vm::HypervisorVmError::InitializeSevSnp(e.into()))?;
703 self.snp_guest_policy
704 .set(guest_policy.into_bits())
705 .expect("sev_snp_init called more than once");
706 Ok(())
707 }
708
709 #[cfg(all(feature = "sev_snp", target_arch = "x86_64"))]
710 fn import_isolated_pages(

Callers 1

init_sev_snpMethod · 0.45

Calls 3

launch_startMethod · 0.80
setMethod · 0.80
into_bitsMethod · 0.80

Tested by

no test coverage detected