cpuid

Function cpuid 

Source
pub fn cpuid(leaf: u32, subleaf: u32) -> CpuidResult
Expand description

Execute CPUID instruction with the specified leaf and subleaf

§Arguments

  • leaf - The CPUID leaf (EAX input)
  • subleaf - The CPUID subleaf (ECX input), defaults to 0

§Returns

The CPUID result containing EAX, EBX, ECX, EDX registers

§Safety

This function is safe as it only reads CPU state and doesn’t modify anything. However, CPUID behavior can vary between CPU models and virtualization environments.