Skip to main content

hypervisor_bit

Function hypervisor_bit 

Source
pub fn hypervisor_bit() -> bool
Expand description

Check the hypervisor present bit in CPUID leaf 1 ECX (bit 31).

Root-partition guard: on a Windows host that runs Hyper-V, this bit is ALSO set (the root partition itself runs virtualised). We check hyper_x() == Enlightenment and return false so we don’t award 100 VM points to a bare-metal machine that simply has Hyper-V enabled.