(_value: &VmConfig)
| 234 | |
| 235 | impl From<&VmConfig> for hypervisor::HypervisorVmConfig { |
| 236 | fn from(_value: &VmConfig) -> Self { |
| 237 | hypervisor::HypervisorVmConfig { |
| 238 | #[cfg(feature = "tdx")] |
| 239 | tdx_enabled: _value.platform.as_ref().is_some_and(|p| p.tdx), |
| 240 | #[cfg(feature = "sev_snp")] |
| 241 | sev_snp_enabled: _value.is_sev_snp_enabled(), |
| 242 | #[cfg(feature = "sev_snp")] |
| 243 | mem_size: _value.memory.total_size(), |
| 244 | #[cfg(feature = "sev_snp")] |
| 245 | vmsa_features: 0, |
| 246 | nested: _value.cpus.nested, |
| 247 | smt_enabled: _value |
| 248 | .cpus |
| 249 | .topology |
| 250 | .as_ref() |
| 251 | .is_some_and(|t| t.threads_per_core > 1), |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | pub type Result<T> = result::Result<T, Error>; |
nothing calls this directly
no test coverage detected