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

Method tdx_capabilities

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

Source from the content-addressed store, hash-verified

1685 ///
1686 #[cfg(feature = "tdx")]
1687 fn tdx_capabilities(&self) -> hypervisor::Result<TdxCapabilities> {
1688 let data = TdxCapabilities {
1689 nr_cpuid_configs: TDX_MAX_NR_CPUID_CONFIGS as u32,
1690 ..Default::default()
1691 };
1692
1693 tdx_command(
1694 &self.kvm.as_raw_fd(),
1695 TdxCommand::Capabilities,
1696 0,
1697 (&raw const data).cast(),
1698 )
1699 .map_err(|e| hypervisor::HypervisorError::TdxCapabilities(e.into()))?;
1700
1701 Ok(data)
1702 }
1703
1704 #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
1705 ///

Callers 1

generate_common_cpuidFunction · 0.45

Calls 3

tdx_commandFunction · 0.85
TdxCapabilitiesClass · 0.85
as_raw_fdMethod · 0.45

Tested by

no test coverage detected