Module cpuid

Module cpuid 

Source
Expand description

CPUID interface for safe CPU feature detection

This module provides a safe, structured interface to the CPUID instruction for detecting CPU features and capabilities. It encapsulates the low-level x86/x86_64 intrinsics with proper error handling and abstraction.

Structs§

Avx512Features
CPU feature flags for AVX-512 detection
CpuidResult
CPUID result structure containing the four registers returned by CPUID

Enums§

CpuVendor
CPU vendor information

Functions§

cpuid
Execute CPUID instruction with the specified leaf and subleaf
cpuid_supported
Check if CPUID is supported (for very old CPUs)
get_avx512_features
Get AVX-512 feature support information
get_family_model_stepping
Get CPU family, model, and stepping information
get_max_leaf
Get maximum supported CPUID leaf
get_vendor
Get CPU vendor as an enum
get_vendor_string
Get CPU vendor string
has_avx
Check if AVX is supported
has_avx2
Check if AVX2 is supported
has_avx512_essential
Check if all essential AVX-512 features are supported
is_virtualized
Check if the system is likely running in a virtualized environment