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

Method get_cpuid2

hypervisor/src/kvm/mod.rs:2261–2270  ·  view source on GitHub ↗
(&self, num_entries: usize)

Source from the content-addressed store, hash-verified

2259 ///
2260 #[cfg(target_arch = "x86_64")]
2261 fn get_cpuid2(&self, num_entries: usize) -> cpu::Result<Vec<CpuIdEntry>> {
2262 let kvm_cpuid = self
2263 .fd
2264 .get_cpuid2(num_entries)
2265 .map_err(|e| cpu::HypervisorCpuError::GetCpuid(e.into()))?;
2266
2267 let v = kvm_cpuid.as_slice().iter().map(|e| (*e).into()).collect();
2268
2269 Ok(v)
2270 }
2271
2272 #[cfg(target_arch = "x86_64")]
2273 ///

Callers 1

stateMethod · 0.45

Calls 3

iterMethod · 0.80
as_sliceMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected