Skip to main content

monitor_wait_kind

Function monitor_wait_kind 

Source
pub fn monitor_wait_kind() -> Option<MonitorWaitKind>
Expand description

The monitor-wait family available on this host (None when the CPU exposes neither, when the build target is not x86_64, or when SUBETHA_NO_MONITOR_WAIT=1). Cached after the first call.

Detection is CPUID-trusting: a hypervisor that cannot virtualize the instructions hides the feature bit, and one that advertises it must back it. The env kill switch is the escape hatch for a host that lies.