Function vm_detect

Source
pub fn vm_detect() -> Detection
Expand description

Run basic hypervisor detection

You can inspect the returned Detection to see which checks triggered (if any).

Examples found in repository?
examples/main.rs (line 5)
3fn main() {
4    // Run detection
5    let detection = vm_detect();
6
7    // Inspect detections
8    if detection.contains(Detection::HYPERVISOR_BIT) {
9        println!("Hypervisor bit set!");
10    }
11}