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

Method nested_state

hypervisor/src/kvm/mod.rs:3580–3593  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

3578 /// if there is any.
3579 #[cfg(target_arch = "x86_64")]
3580 fn nested_state(&self) -> cpu::Result<Option<KvmNestedStateBuffer>> {
3581 let mut buffer = KvmNestedStateBuffer::empty();
3582
3583 let maybe_size = self
3584 .fd
3585 .nested_state(&mut buffer)
3586 .map_err(|e| cpu::HypervisorCpuError::GetNestedState(e.into()))?;
3587
3588 if let Some(_size) = maybe_size {
3589 Ok(Some(buffer))
3590 } else {
3591 Ok(None)
3592 }
3593 }
3594
3595 /// Sets the state of the nested guest for the current vCPU.
3596 #[cfg(target_arch = "x86_64")]

Callers 1

stateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected