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

Method active_vcpus

vmm/src/vm.rs:3553–3561  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

3551 }
3552
3553 fn active_vcpus(&self) -> usize {
3554 let active_vcpus = self.cpu_manager.lock().unwrap().active_vcpus();
3555 if active_vcpus > 0 {
3556 active_vcpus
3557 } else {
3558 // The VM is not booted yet. Report boot_vcpus() instead.
3559 self.cpu_manager.lock().unwrap().boot_vcpus() as usize
3560 }
3561 }
3562}
3563
3564#[cfg(feature = "guest_debug")]

Callers 1

debug_requestMethod · 0.45

Calls 1

boot_vcpusMethod · 0.80

Tested by

no test coverage detected