Back to Firecracker

CPUID normalization (x86_64 only)

docs/cpu_templates/cpuid-normalization.md

1.16.0-dev5.0 KB
Original Source

CPUID normalization (x86_64 only)

On x86_64, Firecracker makes certain modifications to the guest's CPUID regardless of whether a CPU template is used. This is referred to as CPUID normalization. If a CPU template is used the normalization is performed after the CPU template is applied. That means that if the CPU template configures CPUID bits used in the normalization process, they will be overwritten.

See also: boot protocol settings

x86_64 common CPUID normalization

DescriptionLeafSubleafRegisterBits
Pass through vendor ID from host0x0-EBX, ECX, EDXall
Set CLFLUSH line size0x1-EBX15:8
Set maximum number of addressable IDs for logical processors in the physical package0x1-EBX23:16
Set initial APIC ID0x1-EBX31:24
Disable PDCM (Perfmon and Debug Capability)0x1-ECX15
Enable TSC_DEADLINE0x1-ECX24
Enable HYPERVISOR0x1-ECX31
Set HTT value if the microVM's CPU count is greater than 10x1-EDX28
Insert leaf 0xb, subleaf 0x1 if not present0xb0x1allall
Fill extended topology enumeration leaf0xballallall
Pass through L1 cache and TLB information from host0x80000005-allall
Pass through L2 cache and TLB and L3 cache information from host0x80000006-allall

Intel-specific CPUID normalization

DescriptionLeafSubleafRegisterBits
Update deterministic cache parameters0x4allEAX31:14
Disable Intel Turbo Boost technology0x6-EAX1
Disable frequency selection0x6-ECX3
Set FDP_EXCPTN_ONLY bit0x70x0EBX6
Set "Deprecates FPU CS and FPU DS values" bit0x70x0EBX13
Disable WAITPKG (UMONITOR / UMWAIT / TPAUSE)0x70x0ECX5
Disable performance monitoring0xa-allall
Fill v2 extended topology enumeration leaf0x1fallallall
Update brand string to use a default format and real frequency0x80000002, 0x80000003, 0x80000004-allall

AMD-specifc CPUID normalization

DescriptionLeafSubleafRegisterBits
Set IA32_ARCH_CAPABILITIES MSR as not present0x7-EDX29
Set topology extension bit0x80000001-ECX22
Update brand string with a default AMD value0x80000002, 0x80000003, 0x80000004-EAX, EBX, ECX, EDXall
Update number of physical threads0x80000008-ECX7:0
Update APIC ID size0x80000008-ECX15:12
Update cache topology information0x8000001dallallall
Update extended APIC ID0x8000001e-EAX, EBX, ECXall