Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

CPUID

From Wikipedia, the free encyclopedia
Instruction for x86 microprocessors
This articlemay be too technical for most readers to understand. Pleasehelp improve it tomake it understandable to non-experts, without removing the technical details.(January 2025) (Learn how and when to remove this message)

In thex86 architecture, theCPUID instruction (identified by aCPUIDopcode) is aprocessor supplementary instruction (its name derived from "CPU Identification") allowing software to discover details of the processor. It was introduced byIntel in 1993 with the launch of thePentium andSL-enhanced 486 processors.[1]

A program can use theCPUID to determine processor type and whether features such asMMX/SSE are implemented.

History

[edit]

Prior to the general availability of theCPUID instruction, programmers would write esotericmachine code which exploited minor differences in CPU behavior in order to determine the processor make and model.[2][3][4][5] With the introduction of the 80386 processor, EDX on reset indicated the revision but this was only readable after reset and there was no standard way for applications to read the value.

Outside the x86 family, developers are mostly still required to use esoteric processes (involving instruction timing or CPU fault triggers) to determine the variations in CPU design that are present.

For example, in theMotorola 68000 series — which never had aCPUID instruction of any kind — certain specific instructions required elevated privileges. These could be used to tell various CPU family members apart. In theMotorola 68010 the instructionMOVE from SR became privileged. Because the68000 offered an unprivilegedMOVE from SR the two different CPUs could be told apart by a CPU error condition being triggered.

While theCPUID instruction is specific to the x86 architecture, other architectures (like ARM) often provide on-chip registers which can be read in prescribed ways to obtain the same sorts of information provided by the x86CPUID instruction.

Calling CPUID

[edit]

TheCPUID opcode is0F A2.

Inassembly language, theCPUID instruction takes no parameters asCPUID implicitly uses the EAX register to determine the main category of information returned. In Intel's more recent terminology, this is called the CPUID leaf.CPUID should be called withEAX = 0 first, as this will store in the EAX register the highest EAX calling parameter (leaf) that the CPU implements.

To obtain extended function informationCPUID should be called with the most significant bit of EAX set. To determine the highest extended function calling parameter, callCPUID withEAX = 80000000h.

CPUID leaves greater than 3 but less than 80000000 are accessible only when themodel-specific registers have IA32_MISC_ENABLE.BOOT_NT4 [bit 22] = 0 (which is so by default). As the name suggests,Windows NT 4.0 until SP6 did not boot properly unless this bit was set,[6] but later versions of Windows do not need it, so basic leaves greater than 4 can be assumed visible on current Windows systems. As of April 2024[update], basic valid leaves go up to 23h, but the information returned by some leaves are not disclosed in the publicly available documentation, i.e. they are "reserved".

Some of the more recently added leaves also have sub-leaves, which are selected via the ECX register before callingCPUID.

EAX=0: Highest Function Parameter and Manufacturer ID

[edit]

This returns the CPU's manufacturer ID string – a twelve-characterASCII string stored in EBX, EDX, ECX (in that order). The highest basic calling parameter (the largest value that EAX can be set to before callingCPUID) is returned in EAX.

Here is a list of processors and the highest function implemented.

Highest Function Parameter
ProcessorsBasicExtended
EarlierIntel 486CPUID Not Implemented
Later Intel 486 andPentium0x01Not Implemented
Pentium Pro,Pentium II andCeleron0x02Not Implemented
Pentium III0x03Not Implemented
Pentium 40x020x8000 0004
Xeon0x020x8000 0004
Pentium M0x020x8000 0004
Pentium 4 withHyper-Threading0x050x8000 0008
Pentium D (8xx)0x050x8000 0008
Pentium D (9xx)0x060x8000 0008
Core Duo0x0A0x8000 0008
Core 2 Duo0x0A0x8000 0008
Xeon3000, 5100, 5200, 5300, 5400 (5000 series)0x0A0x8000 0008
Core 2 Duo8000 series0x0D0x8000 0008
Xeon 5200, 5400 series0x0A0x8000 0008
Atom0x0A0x8000 0008
Nehalem-based processors0x0B0x8000 0008
Ivy Bridge-based processors0x0D0x8000 0008
Skylake-based processors (proc base & max freq; Bus ref. freq)0x160x8000 0008
System-On-Chip Vendor Attribute Enumeration Main Leaf0x170x8000 0008
Meteor Lake-based processors0x230x8000 0008

The following are known processor manufacturer ID strings:

The following are ID strings used by open sourcesoft CPU cores:

  • "GenuineAO486" – ao486 CPU (old)[13][14]
  • "MiSTer AO486" – ao486 CPU (new)[15][14]
  • "GenuineIntel" – v586 core[16] (this is identical to the Intel ID string)

The following are known ID strings from virtual machines:

  • "MicrosoftXTA" – Microsoft x86-to-ARM[17]
  • "GenuineIntel" – Apple Rosetta 2[18]
  • "VirtualApple" – Newer versions of Apple Rosetta 2
  • "PowerVM Lx86" – PowerVM Lx86 (x86 emulator for IBMPOWER5/POWER6 processors)[19]
  • "Neko Project" – Neko Project II (PC-98 emulator) (used when the CPU to emulate is set to "Neko Processor II")[20][21]

For instance, on aGenuineIntel processor, values returned in EBX is0x756e6547, EDX is0x49656e69 and ECX is0x6c65746e. The following example code displays the vendor ID string as well as the highest calling parameter that the CPU implements.

.intel_syntaxnoprefix.text.m0:.string"CPUID: %x\n".m1:.string"Largest basic function number implemented: %i\n".m2:.string"Vendor ID: %s\n".globlmainmain:pushr12moveax,1subrsp,16cpuidleardi,.m0[rip]movesi,eaxcallprintfmoveax,0cpuidleardi,.m1[rip]movesi,eaxmovr12d,edxmovebp,ecxcallprintfmov3[rsp],ebxlearsi,3[rsp]leardi,.m2[rip]mov7[rsp],r12dmov11[rsp],ebpcallprintfaddrsp,16popr12ret.section.note.GNU-stack,"",@progbits

On some processors, it is possible to modify the Manufacturer ID string reported by CPUID.(EAX=0) by writing a new ID string to particular MSRs (Model-specific registers) using theWRMSR instruction. This has been used on non-Intel processors to enable features and optimizations that have been disabled in software for CPUs that don't return theGenuineIntel ID string.[22] Processors that are known to possess such MSRs include:

Processors with Manufacturer ID MSRs
ProcessorMSRs
IDTWinChip108h-109h[23]
VIA C3,C71108h-1109h[24]
VIA Nano1206h-1207h[25]
Transmeta Crusoe,Efficeon80860001h-80860003h[26][27]
AMDGeode GX, LX3000h-3001h[28]
DM&PVortex86EX252444300h-52444301h[29]

EAX=1: Processor Info and Feature Bits

[edit]

This returns the CPU'sstepping, model, and family information in register EAX (also called thesignature of a CPU), feature flags in registers EDX and ECX, and additional feature info in register EBX.[30]

CPUID EAX=1: Processor Version Information in EAX
EAX
313029282726252423222120191817161514131211109876543210
ReservedExtended Family IDExtended Model IDReservedProcessor TypeFamily IDModelStepping ID
  • Stepping ID is a product revision number assigned due to fixederrata or other changes.
  • The actual processor model is derived from the Model, Extended Model ID and Family ID fields. If the Family ID field is either 6 or 15, the model is equal to the sum of the Extended Model ID field shifted left by 4 bits and the Model field. Otherwise, the model is equal to the value of the Model field.
  • The actual processor family is derived from the Family ID and Extended Family ID fields. If the Family ID field is equal to 15, the family is equal to the sum of the Extended Family ID and the Family ID fields. Otherwise, the family is equal to the value of the Family ID field.
  • The meaning of the Processor Type field is given in the table below.
Processor Type
TypeEncoding inBinary
Original equipment manufacturer (OEM) Processor00
Intel Overdrive Processor01
Dual processor (applicable to IntelP5 Pentium processors only)[31]10
Reserved value11

As of October 2023, the following x86 processor family IDs are known:[32]

CPUID EAX=1: Processor Family IDs
Family ID +
Extended Family ID
IntelAMDOther
0h
1h
2h
3h[a]
4h486486,[33]
5x86,
Élan SC4xx/5xx[34]
Cyrix 5x86,[35]
CyrixMediaGX,[36]
UMC Green CPU,[4]
MCST Elbrus (most models),[10]
MiSTer ao486[37]
5hPentium,
Pentium MMX,
Quark X1000
K5,
K6
Cyrix 6x86,
CyrixMediaGXm,[36]
Geode (except NX),
NexGen Nx586,[4]
IDTWinChip,
IDT WinChip 2,
IDT WinChip 3,
Transmeta Crusoe,
RisemP6,
SiS 550,
DM&PVortex86 (early),[38]
RDC IAD 100,
MCST Elbrus-8C2[10]
6hPentium Pro,
Pentium II,
Pentium III,
Pentium M,
Intel Core (all variants),
Intel Atom (all variants),
Xeon (except NetBurstvariants),
Xeon Phi (except KNC)
K7:Athlon,
Athlon XP
Cyrix 6x86MX/MII,
VIA C3,
VIA C7,
VIA Nano,
DM&PVortex86 (DX3,EX2[39]),
Zhaoxin ZX-A/B/C/C+,
(Centaur CNS[40]),
MCST Elbrus-12C/16C/2C3[10]
7hItanium
(in IA-32 mode)
Zhaoxin KaiXian,
Zhaoxin KaisHeng
8h[b]
9h
0Ah
0BhXeon Phi (Knights Corner)[42]
0Ch
0Dh
0Eh
0FhNetBurst (Pentium 4)K8/Hammer
(Athlon 64)
Transmeta Efficeon
10hK10:Phenom
11hItanium 2[43]
(in IA-32 mode)
Turion X2
12hLlano
13hIntel Core (Panther Cove and up)[44]
14hBobcat
15hBulldozer,
Piledriver,
Steamroller,
Excavator
16hJaguar,
Puma
17hZen 1,
Zen 2
18hHygon Dhyana
19hZen 3,
Zen 4
1AhZen 5
  1. ^Thei386 processor does not support theCPUID instruction - it does however return Family ID3h in the reset-value of EDX.
  2. ^Family ID8h has been reported to have been deliberately avoided for the Pentium 4 processor family due to incompatibility with Windows NT 4.0.[41]
CPUID EAX=1: Additional Information in EBX
BitsEBXValid
7:0Brand Index
15:8CLFLUSH line size (Value * 8 = cache line size in bytes)ifCLFLUSH feature flag is set.

CPUID.01.EDX.CLFSH [bit 19]= 1

23:16Maximum number of addressable IDs for logical processors in this physical package;

The nearest power-of-2 integer that is not smaller than this value is the number of unique initial APIC IDs reserved for addressing different logical processors in a physical package.[a]

Former use: Number of logical processors per physical processor; two for the Pentium 4 processor with Hyper-Threading Technology.[47]

ifHyper-threading feature flag is set.

CPUID.01.EDX.HTT [bit 28]= 1

31:24Local APIC ID: The initial APIC-ID is used to identify the executing logical processor.[b]Pentium 4 and subsequent processors.
  1. ^On CPUs with more than 128 logical processors in a single package (e.g. IntelXeon Phi 7290[45] and AMDThreadripper Pro 7995WX[46]) the value in bit 23:16 is set to a non-power-of-2 value.
  2. ^The Local APIC ID can also be identified via the cpuid 0Bh leaf ( CPUID.0Bh.EDX[x2APIC-ID] ). On CPUs with more than 256 logical processors in one package (e.g. Xeon Phi 7290), leaf 0Bhmust be used because the APIC ID does not fit into 8 bits.

The processor info and feature flags are manufacturer specific but usually, the Intel values are used by other manufacturers for the sake of compatibility.

CPUID EAX=1: Feature Information in EDX and ECX
BitEDXECX[a]Bit
ShortFeatureShortFeature
0fpuOnboardx87 FPUsse3SSE3 (Prescott New Instructions - PNI)0
1vmeVirtual 8086 mode extensions (such as VIF, VIP, PVI)pclmulqdqPCLMULQDQ (carry-less multiply) instruction1
2deDebugging extensions (CR4 bit 3)dtes6464-bit debug store (edx bit 21)2
3psePage Size Extension (4 MB pages)monitorMONITOR andMWAIT instructions (PNI)3
4tscTime Stamp Counter andRDTSC instructionds-cplCPL qualified debug store4
5msrModel-specific registers andRDMSR/WRMSR instructionsvmxVirtual Machine eXtensions5
6paePhysical Address ExtensionsmxSafer Mode Extensions (LaGrande) (GETSEC instruction)6
7mceMachine Check ExceptionestEnhancedSpeedStep7
8cx8[b]CMPXCHG8B (compare-and-swap) instructiontm2Thermal Monitor 28
9apic[c]OnboardAdvanced Programmable Interrupt Controllerssse3Supplemental SSE3 instructions9
10(mtrr)[d](reserved)cnxt-idL1 Context ID10
11sep[e]SYSENTER andSYSEXIT fast system call instructionssdbgSilicon Debug interface11
12mtrrMemory Type Range Registers[f]fmaFused multiply-add (FMA3)12
13pgePage Global Enable bit inCR4cx16CMPXCHG16B instruction[g]13
14mcaMachine check architecturextprCan disable sending task priority messages14
15cmovConditional move:CMOV,FCMOV andFCOMI instructions[h]pdcmPerfmon & debug capability15
16patPage Attribute Table(reserved)[i]16
17pse-3636-bit page size extensionpcidProcess context identifiers (CR4 bit 17)17
18psnProcessor Serial Number supported and enabled[j]dcaDirect cache access for DMA writes[58][59]18
19clfshCLFLUSH cache line flush instruction (SSE2)sse4.1SSE4.1 instructions19
20(nx)No-execute (NX) bit (Itanium only, reserved on other CPUs)[60][k]sse4.2SSE4.2 instructions20
21dsDebug store: save trace of executed jumpsx2apicx2APIC (enhanced APIC)21
22acpiOnboard thermal control MSRs forACPImovbeMOVBE instruction (big-endian)22
23mmxMMX instructions (64-bit SIMD)popcntPOPCNT instruction23
24fxsrFXSAVE,FXRSTOR instructions,CR4 bit 9tsc-deadlineAPIC implements one-shot operation using a TSC deadline value24
25sseStreaming SIMD Extensions (SSE) instructions
(aka "Katmai New Instructions"; 128-bit SIMD)
aes-niAES instruction set25
26sse2SSE2 instructionsxsaveExtensible processor state save/restore:
XSAVE,XRSTOR,XSETBV,XGETBV instructions
26
27ssCPU cache implements self-snooposxsaveXSAVE enabled by OS27
28httMax APIC IDs reserved field is Valid[l]avxAdvanced Vector Extensions (256-bit SIMD)28
29tmThermal monitor automatically limits temperaturef16cFloating-point conversion instructions to/fromFP16 format29
30ia64IA64 processor emulating x86[60]rdrndRDRAND (on-chip random number generator) feature30
31pbePending Break Enable (PBE# pin) wakeup capabilityhypervisorHypervisor present (always zero on physical CPUs)[63][64][65]31
  1. ^On some older processors, executingCPUID with a leaf index (EAX) greater than 0 may leave EBX and ECX unmodified, keeping their old values. For this reason, it is recommended to zero out EBX and ECX before executingCPUID with a leaf index of 1.

    Processors noted to exhibit this behavior include Cyrix MII[48] and IDT WinChip 2.[49]

  2. ^On processors from IDT, Transmeta and Rise (vendor IDsCentaurHauls,GenuineTMx86 andRiseRiseRise), theCMPXCHG8B instruction is always supported, however the feature bit for the instruction might not be set. This is a workaround for a bug in Windows NT.[50]
  3. ^On earlyAMD K5 (AuthenticAMD Family 5 Model 0) processors only, EDX bit 9 used to indicate support for PGE instead. This was moved to bit 13 from K5 Model 1 onwards.[51]
  4. ^Intel AP-485, revisions 006[52] to 008, listsCPUID.(EAX=1):EDX[bit 10] as having the name "MTRR" (albeit described as "Reserved"/"Do not count on their value") - this name was removed in later revisions of AP-485, and the bit has been listed as reserved with no name since then.
  5. ^OnPentium Pro (GenuineIntel Family 6 Model 1) processors only, EDX bit 11 is invalid - the bit is set, but theSYSENTER andSYSEXIT instructions are not supported on the Pentium Pro.[53]
  6. ^For the MTRRs, additional feature information is not available through CPUID, but instead through the read-onlyMTRRCAP MSR (MSR0FEh). This MSR has the following layout:
    BitsUsage
    7:0Number of variable-range MTRRs
    8Fixed-range MTRRs supported
    9(Reserved)
    10Write-Combining memory type supported
    11SMRR (System-Management Range Register) supported
    12PRMRR (Processor Reserved Memory Range Register, part ofSGX) supported
    13SMRR2 supported[54]
    14SMRR-lock supported
    15SEAMRR (SEcure Arbitration Mode Range Register, part ofTDX) supported[55]
    63:16(Reserved)
  7. ^Some very early Intel 64 processors have theCMPXCHG16B feature bit set even though they do not support the instruction - this applies toGenuineIntel Family0Fh Model 3 Stepping 4 chips (90nm Pentium 4) only.[56]
  8. ^FCMOV andFCOMI instructions only available if onboard x87 FPU also present (indicated by EDX bit 0).
  9. ^ECX bit 16 is listed as "Reserved" in public Intel and AMD documentation and is not set in any known processor. However, some versions of theWindows Vista kernel are reported to be checking this bit[57] - if it is set, Vista will recognize it as a "processor channels" feature.
  10. ^On Intel and Transmeta[26] CPUs that support PSN (Processor Serial Number), the PSN can be disabled by setting bit 21 of MSR119h (BBL_CR_CTL) to 1. Doing so will remove leaf 3 and causeCPUID.(EAX=1):EDX[bit 18] to return 0.
  11. ^On non-Itanium x86 processors, support for theNo-execute bit is indicated inCPUID.(EAX=8000_0001):EDX[bit 20] instead.
  12. ^EDX bit 28, if set, indicates that bits 23:16 of CPUID.(EAX=1):EBX are valid. If this bit is not set, then the CPU package contains only 1 logical processor.

    In older documentation, this bit is often listed as a "Hyper-threading technology"[61] flag - however, while this flag is a prerequisite for Hyper-Threading support, it does not by itself indicate support for Hyper-Threading and it has been set on many CPUs that do not feature any form of multi-threading technology.[62]

Reserved fields should be masked before using them for processor identification purposes.

EAX=2: Cache and TLB Descriptor Information

[edit]

This returns a list of descriptors indicating cache andTLB capabilities in EAX, EBX, ECX and EDX registers.

On processors that support this leaf, callingCPUID with EAX=2 will cause the bottom byte of EAX to be set to01h[a] and the remaining 15 bytes of EAX/EBX/ECX/EDX to be filled with 15 descriptors, one byte each. These descriptors provide information about the processor's caches, TLBs and prefetch. This is typically one cache or TLB per descriptor, but some descriptor-values provide other information as well - in particular,00h is used for an empty descriptor,FFh indicates that the leaf does not contain valid cache information and that leaf 4h should be used instead, andFEh indicates that the leaf does not contain valid TLB information and that leaf 18h should be used instead. The descriptors may appear in any order.

For each of the four registers (EAX,EBX,ECX,EDX), if bit 31 is set, then the register should not be considered to contain valid descriptors (e.g. on Itanium in IA-32 mode, CPUID(EAX=2) returns80000000h in EDX - this should be interpreted to mean that EDX contains no valid information, not that it contains a descriptor for a 512K L2 cache.)

The table below provides, for known descriptor values, a condensed description of the cache or TLB indicated by that descriptor value (or other information, where that applies). The suffixes used in the table are:

  • K,M,G : binary kilobyte, megabyte, gigabyte (capacity for caches, page-size for TLBs)
  • E : entries (for TLBs; e.g. 64E = 64 entries)
  • p : page-size (e.g. 4Kp for TLBs where each entry describes one 4 KBpage, 4K/2Mp for TLBs where each entry can describe either one 4 KB page or one 2 MB hugepage)
  • L : cache-line size (e.g. 32L = 32-byte cache line size)
  • S : cache sector size (e.g. 2S means that the cache uses sectors of 2 cache-lines each)
  • A : associativity (e.g. 6A = 6-wayset-associative, FA = fully-associative)
Legend for cache/TLB descriptor byte encodings
Level-1
instruction
or data cache
Level-2
cache
Level-3
cache
Instruction
or data TLB
Level-2
shared
TLB
Other
information
(reserved)
CPUID EAX=2: Cache/TLB descriptor byte encodings
x0x1x2x3x4x5x6x7x8x9xAxBxCxDxExF
0xnull
descriptor
ITLB: 32E,
4Kp, 4A
ITLB: 2E,
4Mp, FA
DTLB: 64E,
4Kp, 4A
DTLB: 8E,
4Mp, 4A
DTLB: 32E,
4Mp, 4A
L1I: 8K,
4A, 32L
0xL1I: 16K,
4A, 32L
L1I: 32K,
4A, 64L
L1D: 8K,
2A, 32L
ITLB: 4E,
4Mp, FA
L1D: 16K,
4A, 32L
L1D: 16K,
4A, 64L[b]
L1D: 24K,
6A, 64L[b]
0x
1x(L1D: 16K,
4A, 32L)[c]
(L1I: 16K,
4A, 32L)[c]
1x(L2C: 96K,
6A, 64L)[c]
L2C: 128K,
2A, 64L
1x
2xL2C: 256K,
8A, 64L[d]
L3C: 512K,
4A, 64L, 2S
L3C: 1M,
8A, 64L, 2S
L2C: 1M,
16A, 64L
L3C: 2M,
8A, 64L, 2S
(128-byte
prefetch)[e]
(128-byte
prefetch)[e]
2x(128-byte
prefetch)[e]
L3C: 4M,
8A, 64L, 2S
L1D: 32K,
8A, 64L
2x
3xL1I: 32K,
8A, 64L
3xL2C: 128K,
4A, 64L, 2S[f]
L2C: 192K,
6A, 64L, 2S[f]
L2C: 128K,
2A, 64L, 2S[f]
L2C: 256K,
4A, 64L, 2S[f]
L2C: 384K,
6A, 64L, 2S[f]
L2C: 512K,
4A, 64L, 2S[f]
L2C: 256K,
2A, 64L[g]
3x
4xno L3 cache
present
L2C: 128K,
4A, 32L
L2C: 256K,
4A, 32L[h]
L2C: 512K,
4A, 32L
L2C: 1M,
4A, 32L
L2C: 2M,
4A, 32L
L3C: 4M,
4A, 64L
L3C: 8M,
8A, 64L
4xL2C: 3M,
12A, 64L
L2C/L3C:[i]
4M, 16A, 64L
L3C: 6M,
12A, 64L
L3C: 8M,
16A, 64L
L3C: 12M,
12A, 64L
L3C: 16M,
16A, 64L
L2C: 6M,
24A, 64L
ITLB: 32E,
4Kp[j]
4x
5xITLB: 64E,FA,
4K/2M/4Mp
ITLB: 128E,FA,
4K/2M/4Mp
ITLB: 256E,FA,
4K/2M/4Mp
ITLB: 7E,
2M/4Mp, FA
DTLB: 16E,
4Mp, 4A
DTLB: 16E,
4Kp, 4A
5xDTLB: 16E,
4Kp, FA
DTLB: 32E,
2M/4Mp, 4A
DTLB: 64E
4K/4Mp, FA
DTLB: 128E,
4K/4Mp, FA
DTLB: 256E,
4K/4Mp, FA
5x
6xL1D: 16K,
8A, 64L
ITLB: 48E,
4Kp, FA
Two DTLBs:
32E, 2M/4Mp, 4A
+ 4E, 1Gp, FA
DTLB: 512E,
4Kp, 4A
L1D: 8K,
4A, 64L
L1D: 16K,
4A, 64L
6xL1D: 32K,
4A, 64L
DTLB: 64E,
4Kp, 8A
DTLB: 256E,
4Kp, 8A
DTLB: 128E,
2M/4Mp, 8A
DTLB: 16E,
1Gp, FA
6x
7xTrace cache,
12K-μop, 8A[k]
Trace cache,
16K-μop, 8A
Trace cache,
32K-μop, 8A
Trace cache,
64K-μop, 8A[f]
[h]ITLB: 8E,
2M/4Mp, FA[l]
(L1I: 16K,
4A, 64L)[m][h]
7xL2C: 1M,
4A, 64L
L2C: 128K,
8A, 64L, 2S
L2C: 256K,
8A, 64L, 2S
L2C: 512K,
8A, 64L, 2S
L2C: 1M,
8A, 64L, 2S
L2C: 2M,
8A, 64L
(L2C: 256K,
8A, 128L)[m]
L2C: 512K,
2A, 64L
7x
8xL2C: 512K,
8A, 64L[k]
(L2C: 128K,
8A, 32L)[e]
L2C: 256K,
8A, 32L[h]
L2C: 512K,
8A, 32L
L2C: 1M,
8A, 32L
L2C: 2M,
8A, 32L
L2C: 512K,
4A, 64L
L2C: 1M,
8A, 64L
8x(L3C: 2M,
4A, 64L)[c]
(L3C: 4M,
4A, 64L)[c]
(L3C: 8M,
4A, 64L)[c]
(L3C: 3M,
12A, 128L)[m][n]
8x
9x(ITLB: 64E,FA,
4K-256Mp)[c]
(DTLB: 32E,FA,
4K-256Mp)[c]
9x(DTLB: 96E,FA,
4K-256Mp)[c]
9x
AxDTLB: 32E,
4Kp, FA
AxAx
BxITLB: 128E,
4Kp, 4A
ITLB: 8E,
2M/4Mp, 4A[o]
ITLB: 64E,
4Kp, 4A
DTLB: 128E,
4Kp, 4A
DTLB: 256E,
4Kp, 4A
ITLB: 64E,
4Kp, 8A
ITLB: 128E,
4Kp, 8A
BxDTLB: 64E,
4Kp, 4A
Bx
CxDTLB: 8E,
4K/4Mp, 4A
L2TLB: 1024E,
4K/2Mp, 8A
DTLB: 16E,
2M/4Mp, 4A[83]
Two L2 STLBs:
1536E, 4K/2Mp, 6A[p]
+ 16E, 1Gp, 4A
DTLB: 32E,
2M/4Mp, 4A
CxL2TLB: 512E,
4Kp, 4A
Cx
DxL3C: 512K,
4A, 64L
L3C: 1M,
4A, 64L
L3C: 2M,
4A, 64L
L3C: 1M,
8A, 64L
L3C: 2M,
8A, 64L
DxL3C: 4M,
8A, 64L
L3C: 1.5M,
12A, 64L
L3C: 3M,
12A, 64L
L3C: 6M,
12A, 64L
Dx
ExL3C: 2M,
16A, 64L
L3C: 4M,
16A, 64L
L3C: 8M,
16A, 64L
ExL3C: 12M,
24A, 64L
L3C: 18M,
24A, 64L[86]
L3C: 24M,
24A, 64L
Ex
Fx64-byte
prefetch[q]
128-byte
prefetch[q]
FxLeaf 2 has
no TLB info,
use leaf 18h
Leaf 2 has
no cache info,
use leaf 4
Fx
x0x1x2x3x4x5x6x7x8x9xAxBxCxDxExF
  1. ^In older Intel documentation, the bottom byte of the value returned in EAX is described as specifying the number of times theCPUID must be called with EAX=2 to get hold of all the cache/TLB descriptors. However, all known processors that implement this leaf return01h in this byte, and newer Intel documentation (SDM rev 053[66] and later) specifies this byte as having the value01h.
  2. ^abFor descriptors0Dh and0Eh, Intel AP-485 rev 37[67] lists the caches they describe as havingECC - this was removed in rev 38 and later Intel documentation.
  3. ^abcdefghiDescriptors10h,15h,1Ah,88h,89h,8Ah,90h,96h,9Bh are documented for the IA-32 operation mode ofItanium only.[68]
  4. ^The cache described by descriptor21h is in some places (e.g. AP-485 rev 36[69] but not rev 37) referred to as an "MLC" (Mid-Level Cache).
  5. ^abcdDescriptor values26h,27h,28h and81h are not listed in Intel documentation and are not used in any known released CPU. (81h has been seen in engineering samples of the cancelledIntel Timna.[79]) They have nevertheless been reported to be recognized by theWindows NT kernel v5.1 (Windows XP) and higher.81h is also recognized by v5.0 (Windows 2000).[80]
  6. ^abcdefgDescriptors39h-3Eh and73h are listed in rev 36 of Intel AP-485,[69] but have been removed from later Intel documentation even though several of them have been used in Intel CPUs (mostly inNetburst-based Celeron CPUs, e.g.39h in"Willamette-128",[70]3Bh in "Northwood-128",[71] and3Ch in "Prescott-256"[72]).
  7. ^Descriptor3Fh is, as of November 2024, not listed in any known Intel documentation - it is nevertheless used in IntelTolapai processors,[73] and is listed in an Intel-provided Linux kernel patch.[74]
  8. ^abcdDocumentation for the VIACyrix III "Joshua" processor (CyrixInstead Family 6 Model 5) indicates that this processor uses descriptor values74h and77h for its TLBs, and values42h and82h for its caches - but does not specify which caches/TLBs in the processor each of these descriptor values correspond to.[75]
  9. ^Descriptor49h indicates a level-3 cache onGenuineIntel Family 0Fh Model 6 (Pentium 4 based Xeon) CPUs, and a level-2 cache on other CPUs.
  10. ^Intel's CPUID documentation does not specify the associativity of the ITLB indicated by descriptor4Fh. The processors that use this descriptor (Intel Atom"Bonnell"[76]) are described elsewhere as having a fully-associative 32-entry ITLB.[77]
  11. ^abOn Cyrix and Geode CPUs (Vendor IDsCyrixInstead andGeode by NSC), descriptors70h and80h have a different meaning:[78]
    • Descriptor70h indicates a 32-entry shared instruction+data 4-way-set-associative TLB with a 4K page size.
    • Descriptor80h indicates a 16 KB shared instruction+data L1 cache with 4-way set-associativity and a cache-line size of 16 bytes.
  12. ^Descriptor76h is listed as an 1 MB L2 cache in rev 37 of Intel AP-485,[67] but as an instruction TLB in rev 38 and all later Intel documentation.
  13. ^abcDescriptors77h,7Eh,8Dh are documented for the IA-32 operation mode ofItanium 2 only.[81]
  14. ^Under the IA-32 operation mode of Itanium 2, the L3 cache size is always reported as 3 MB regardless of the actual size of the cache.[82]
  15. ^For descriptorB1h, the TLB capacity is 8 elements when using 2 MB pages, but reduced to 4 elements when using 4 MB pages.
  16. ^For descriptorC3h, many Intel processors that use this descriptor have an L2 TLB that is 12-way set-associative, not 6-way set-associative. This applies to at least Skylake[84] and Whiskey/Kaby/Coffee/Comet Lake[85] CPUs.
  17. ^abThe prefetch specified by descriptorsF0h andF1h is the recommended stride for memory prefetching with thePREFETCHNTA instruction.[87]

EAX=3: Processor Serial Number

[edit]
See also:Pentium III § Controversy about privacy issues

This returns the processor's serial number. The processor serial number was introduced on IntelPentium III, but due to privacy concerns, this feature is no longer implemented on later models (the PSN feature bit is always cleared).Transmeta's Efficeon and Crusoe processors also provide this feature. AMD CPUs however, do not implement this feature in any CPU models.

For Intel Pentium III CPUs, the serial number is returned in the EDX:ECX registers. For Transmeta Efficeon CPUs, it is returned in the EBX:EAX registers. And for Transmeta Crusoe CPUs, it is returned in the EBX register only.

Note that the processor serial number feature must be enabled in theBIOS setting in order to function.


EAX=4 and EAX=8000'001Dh: Cache Hierarchy and Topology

[edit]

These two leaves are used to provide information about thecache hierarchy levels available to the processor core on which theCPUID instruction is run. Leaf4 is used on Intel processors and leaf8000'001Dh is used on AMD processors - they both return data in EAX, EBX, ECX and EDX, using the same data format except that leaf4 returns a few additional fields that are considered "reserved" for leaf8000'001Dh. They both provide CPU cache information in a series of sub-leaves selected by ECX - to get information about all the cache levels, it is necessary to invokeCPUID repeatedly, with EAX=4 or8000'001Dh and ECX set to increasing values starting from 0 (0,1,2,...) until a sub-leaf not describing any caches (EAX[4:0]=0) is found. The sub-leaves that do return cache information may appear in any order, but all of them will appear before the first sub-leaf not describing any caches.

In the below table, fields that are defined for leaf4 but not for leaf8000'001Dh are highlighted with yellow cell coloring and a(#4) item.

CPUID EAX=4 and 8000'001Dh: Cache property information in EAX, EBX and EDX
BitEAXEBXEDX[a]Bit
0Cache Type:
  • 0: (No more caches)
  • 1: Data Cache
  • 2: Instruction Cache
  • 3: Unified Cache
  • 4-31: (reserved)
Systemcoherency line size in bytes,minus 1WBINVD cache invalidation execution scope.
A value of 0 indicates that theINVD/WBINVD instructions will invalidate all lower-levels caches of this cache, including caches that belong to sibling processors sharing this cache. A value of 1 indicates that lower-level caches of sibling processors that are sharing this cache are not guaranteed to be all cleared.
0
1Cache inclusiveness. If 1, then cache is inclusive of lower-level caches.1
2Complex cache indexing. If 1, then cache uses a complex function for cache indexing, else the cache is direct-mapped.(#4)2
3(reserved)3
4(reserved)4
7:5Cache Level (starting from 1)(reserved)7:5
8Self initializing cache level (1=doesn't need software initialization after reset)(reserved)8
9Fully Associative Cache(reserved)9
10(WBINVD cache invalidation execution scope)[b](#4)(reserved)10
11(Cache Inclusiveness)[b](#4)(reserved)11
13:12(reserved)Physical line partitions (number of cache lines that share a cache address tag),minus 1(reserved)13:12
21:14Maximum number of addressable IDs for logical processors sharing this cache,minus 1(reserved)21:14
25:22Ways ofcache associativity,minus 1(reserved)25:22
31:26Maximum number of addressable IDs for processor cores in physical package,minus 1(#4)(reserved)31:26
  1. ^Intel AP-485, revisions 31[88] and 32, list bits 9:0 of EDX as a "Prefetch Stride" field - this was removed in revision 33 and all later Intel documentation, and no processor is known to use EDX in this manner.
  2. ^abFor CPUID leaf 4, bits 11:10 of EAX are documented for the Xeon Phi "Knights Corner" (GenuineIntel Family0Bh) processor only.[42] For other processors, bits 1:0 of EDX should be used instead.

For any caches that are valid and not fully-associative, the value returned in ECX is the number of sets in the cache minus 1. (For fully-associative caches, ECX should be treated as if it return the value 0.)For any given cache described by a sub-leaf ofCPUID leaf4 or8000'001Dh, the total cache size in bytes can be computed as:

CacheSize = (EBX[11:0]+1) * (EBX[21:12]+1) * (EBX[31:22]+1) * (ECX+1)

For example, on IntelCrystalwell CPUs, executing CPUID with EAX=4 and ECX=4 will cause the processor to return the following size information for its level-4 cache in EBX and ECX:EBX=03C0F03F andECX=00001FFF - this should be taken to mean that this cache has a cache line size of 64 bytes (EBX[11:0]+1), has 16 cache lines per tag (EBX[21:12]+1), is 16-way set-associative (EBX[31:22]+1) with 8192 sets (ECX+1), for a total size of 64*16*16*8192=134217728 bytes, or 128 binary megabytes.

EAX=4 and EAX=Bh: Intel Thread/Core and Cache Topology

[edit]

These two leaves are used for processor topology (thread, core, package) and cache hierarchy enumeration in Intel multi-core (and hyperthreaded) processors.[89] As of 2013[update] AMD does not use these leaves but has alternate ways of doing the core enumeration.[90]

Unlike most other CPUID leaves, leaf Bh will return different values in EDX depending on which logical processor the CPUID instruction runs; the value returned in EDX is actually thex2APIC id of the logical processor. The x2APIC id space is not continuously mapped to logical processors, however; there can be gaps in the mapping, meaning that some intermediate x2APIC ids don't necessarily correspond to any logical processor. Additional information for mapping the x2APIC ids to cores is provided in the other registers. Although the leaf Bh has sub-leaves (selected by ECX as described further below), the value returned in EDX is only affected by the logical processor on which the instruction is running but not by the subleaf.

The processor(s) topology exposed by leaf Bh is a hierarchical one, but with the strange caveat that the order of (logical) levels in this hierarchy doesn't necessarily correspond to the order in the physical hierarchy (SMT/core/package). However, every logical level can be queried as an ECX subleaf (of the Bh leaf) for its correspondence to a "level type", which can be either SMT, core, or "invalid". The level id space starts at 0 and is continuous, meaning that if a level id is invalid, all higher level ids will also be invalid. The level type is returned in bits 15:08 of ECX, while the number of logical processors at the level queried is returned in EBX. Finally, the connection between these levels and x2APIC ids is returned in EAX[4:0] as the number of bits that the x2APIC id must be shifted in order to obtain a unique id at the next level.

As an example, a dual-coreWestmere processor capable ofhyperthreading (thus having two cores and four threads in total) could have x2APIC ids 0, 1, 4 and 5 for its four logical processors. Leaf Bh (=EAX), subleaf 0 (=ECX) of CPUID could for instance return 100h in ECX, meaning that level 0 describes the SMT (hyperthreading) layer, and return 2 in EBX because there are two logical processors (SMT units) per physical core. The value returned in EAX for this 0-subleaf should be 1 in this case, because shifting the aforementioned x2APIC ids to the right by one bit gives a unique core number (at the next level of the level id hierarchy) and erases the SMT id bit inside each core. A simpler way to interpret this information is that the last bit (bit number 0) of the x2APIC id identifies the SMT/hyperthreading unit inside each core in our example. Advancing to subleaf 1 (by making another call to CPUID with EAX=Bh and ECX=1) could for instance return 201h in ECX, meaning that this is a core-type level, and 4 in EBX because there are 4 logical processors in the package; EAX returned could be any value greater than 3, because it so happens that bit number 2 is used to identify the core in the x2APIC id. Note that bit number 1 of the x2APIC id is not used in this example. However, EAX returned at this level could well be 4 (and it happens to be so on a Clarkdale Core i3 5x0) because that also gives a unique id at the package level (=0 obviously) when shifting the x2APIC id by 4 bits. Finally, you may wonder what the EAX=4 leaf can tell us that we didn't find out already. In EAX[31:26] it returns the APIC mask bitsreserved for a package; that would be 111b in our example because bits 0 to 2 are used for identifying logical processors inside this package, but bit 1 is also reserved although not used as part of the logical processor identification scheme. In other words, APIC ids 0 to 7 are reserved for the package, even though half of these values don't map to a logical processor.

The cache hierarchy of the processor is explored by looking at the sub-leaves of leaf 4. The APIC ids are also used in this hierarchy to convey information about how the different levels of cache are shared by the SMT units and cores. To continue our example, the L2 cache, which is shared by SMT units of the same core but not between physical cores on the Westmere is indicated by EAX[26:14] being set to 1, while the information that the L3 cache is shared by the whole package is indicated by setting those bits to (at least) 111b. The cache details, including cache type, size, and associativity are communicated via the other registers on leaf 4.

Beware that older versions of the Intel app note 485 contain some misleading information, particularly with respect to identifying and counting cores in a multi-core processor;[91] errors from misinterpreting this information have even been incorporated in the Microsoft sample code for using CPUID, even for the 2013 edition of Visual Studio,[92] and also in the sandpile.org page for CPUID,[93] but the Intel code sample for identifying processor topology[89] has the correct interpretation, and the current Intel Software Developer's Manual has a more clear language. The (open source) cross-platform production code[94] fromWildfire Games also implements the correct interpretation of the Intel documentation.

Topology detection examples involving older (pre-2010) Intel processors that lack x2APIC (thus don't implement the EAX=Bh leaf) are given in a 2010 Intel presentation.[95] Beware that using that older detection method on 2010 and newer Intel processors may overestimate the number of cores and logical processors because the old detection method assumes there are no gaps in the APIC id space, and this assumption is violated by some newer processors (starting with the Core i3 5x0 series), but these newer processors also come with an x2APIC, so their topology can be correctly determined using the EAX=Bh leaf method.

EAX=5: MONITOR/MWAIT Features

[edit]

This returns feature information related to theMONITOR andMWAIT instructions in the EAX, EBX, ECX and EDX registers.

CPUID EAX=5: MONITOR/MWAIT feature information in EAX, EBX, EDX
BitEAXEBXEDXBit
3:0Smallest monitor-line size in bytesLargest monitor-line size in bytesNumber of C0[a] sub-states supported forMWAIT3:0
7:4Number of C1 sub-states supported forMWAIT7:4
11:8Number of C2 sub-states supported forMWAIT11:8
15:12Number of C3 sub-states supported forMWAIT15:12
19:16(reserved)(reserved)Number of C4 sub-states supported forMWAIT19:16
23:20Number of C5 sub-states supported forMWAIT23:20
27:24Number of C6 sub-states supported forMWAIT27:24
31:28Number of C7 sub-states supported forMWAIT31:28
  1. ^The C0 to C7 states are processor-specific C-states, which do not necessarily correspond 1:1 toACPI C-states.
CPUID EAX=5: MONITOR/MWAIT extension enumeration in ECX
BitECX
ShortFeature
0EMXEnumeration of MONITOR/MWAIT extensions in ECX and EDX supported
1IBESupports treating interrupts as break-events forMWAIT even when interrupts are disabled
2(reserved)
3Monitorless_­MWAITAllowMWAIT to be used for power management without setting up memory monitoring withMONITOR[96]

31:4
 
(reserved)

EAX=6: Thermal and Power Management

[edit]

This returns feature bits in the EAX register and additional information in the EBX, ECX and EDX registers.

CPUID EAX=6: Thermal/power management feature bits in EAX
BitEAX
ShortFeature
0DTSDigital Thermal Sensor capability
1Intel Turbo Boost Technology capability
2ARAT[a]Always RunningAPIC Timer capability
3(reserved)
4PLNPower Limit Notification capability
5ECMDExtended Clock Modulation Duty capability
6PTMPackage Thermal Management capability
7HWPHardware-controlledPerformance States. MSRs added:
  • IA32_PM_ENABLE(770h)
  • IA32_HWP_CAPABILITIES(771h)
  • IA32_HWP_REQUEST(774h)
  • IA32_HWP_STATUS(777h
8HWP_NotificationHWP notification of dynamic guaranteed performance change -IA32_HWP_INTERRUPT(773h) MSR
9HWP_Activity_­WindowHWP Activity Window control - bits 41:32 ofIA32_HWP_REQUEST MSR
10HWP_Energy_­Performance_­PreferenceHWP Energy/performance preference control - bits 31:24 ofIA32_HWP_REQUEST MSR
11HWP_Package_­Level_RequestHWP Package-level control -IA32_HWP_REQUEST_PKG(772h) MSR
12(reserved)
13HDCHardwareDuty Cycling supported. MSRs added:
  • IA32_PKG_HDC_CTL (DB0h)
  • IA32_PM_CTL1 (DB1h)
  • IA32_THREAD_STALL (DB2h)
14Intel Turbo Boost Max Technology 3.0 available
15Interrupts upon changes toIA32_HWP_CAPABILITIES.Highest_Performance (bits 7:0) supported
16HWPPECI override supported - bits 63:60 ofIA32_HWP_PECI_REQUEST_INFO(775h) MSR
17Flexible HWP - bits 63:59 ofIA32_HWP_REQUEST MSR
18Fast Access ModeFast access mode forIA32_HWP_REQUEST MSR supported[b]
19HW_FEEDBACKHardware Feedback Interface. Added MSRs:
  • IA32_HW_FEEDBACK_PTR(17D0h)
  • IA32_HW_FEEDBACK_CONFIG(17D1h) (bit 0 enables HFI, bit 1 enables Intel Thread Director)
20IA32_HWP_REQUEST of idle logical processor ignored when only one of two logical processors thatshare a physical processor is active.
21(reserved)
22HWP Control MSRIA32_HWP_CTL(776h) MSR supported[98]
23Intel Thread Director supported. Added MSRs:
  • IA32_THREAD_FEEDBACK_CHAR(17D2h)
  • IA32_HW_FEEDBACK_THREAD_CONFIG(17D4h)
24IA32_THERM_INTERRUPT MSR bit 25 supported

31:25
 
(reserved)
  1. ^On Intel Pentium 4 family processors only, bit 2 of EAX is used to indicate OPP (Operating Point Protection)[97] instead of ARAT.
  2. ^To enable fast (non-serializing) access mode for theIA32_HWP_REQUEST MSR on CPUs that support it, it is necessary to set bit 0 of theFAST_UNCORE_MSRS_CTL(657h) MSR.
CPUID EAX=6: Thermal/power management feature fields in EBX, ECX and EDX
BitEBXECXEDXBit
0Number of Interrupt Thresholds in Digital Thermal SensorEffective frequency interface supported -IA32_MPERF(0E7h) andIA32_APERF(0E8h) MSRsHardware Feedback reporting: Performance Capability Reporting supported0
1(ACNT2 Capability)[a]Hardware Feedback reporting: Efficiency Capability Reporting supported1
2(reserved)(reserved)2
3Performance-Energy Bias capability -IA32_ENERGY_PERF_BIAS(1B0h) MSR3
7:4(reserved)(reserved)7:4
11:8Number of Intel Thread Director classes supported by hardwareSize of Hardware Feedback interface structure (in units of 4 KB) minus 111:8
15:12(reserved)15:12

31:16
 
(reserved)Index of this logical processor's row in hardware feedback interface structure
31:16
 
  1. ^The "ACNT2 Capability" bit is listed in Intel AP-485 rev 038[99] and 039, but not listed in any revision of the Intel SDM. The feature is known to exist in only a few Intel CPUs, e.g. Xeon "Harpertown" stepping E0.[100]

EAX=7, ECX=0: Extended Features

[edit]

This returns extended feature flags in EBX, ECX, and EDX. Returns the maximum ECX value for EAX=7 in EAX.

CPUID EAX=7,ECX=0: Extended feature bits in EBX, ECX and EDX
BitEBXECXEDXBit
ShortFeatureShortFeatureShortFeature
0fsgsbaseAccess to base of %fs and %gsprefetchwt1PREFETCHWT1 instruction(sgx-tem)[a]?0
1IA32_TSC_ADJUST MSRavx512-vbmiAVX-512 Vector Bit Manipulation Instructionssgx-keysAttestation Services forIntel SGX1
2sgxSoftware Guard ExtensionsumipUser-mode Instruction Preventionavx512-4vnniwAVX-512 4-register Neural Network Instructions2
3bmi1Bit Manipulation Instruction Set 1pkuMemory Protection Keys for User-mode pagesavx512-4fmapsAVX-512 4-register Multiply Accumulation Single precision3
4hleTSX Hardware Lock ElisionospkePKU enabled by OSfsrmFast ShortREP MOVSB4
5avx2Advanced Vector Extensions 2waitpkgTimed pause and user-level monitor/wait instructions (TPAUSE,UMONITOR,UMWAIT)uintrUser Inter-processor Interrupts5
6fdp-excptn-onlyx87 FPU data pointer register updated on exceptions onlyavx512-vbmi2AVX-512 Vector Bit Manipulation Instructions 2(reserved)6
7smepSupervisor Mode Execution Preventioncet_ss/shstkControl flow enforcement (CET): shadow stack (SHSTK alternative name)(reserved)7
8bmi2Bit Manipulation Instruction Set 2gfniGalois Field instructionsavx512-vp2intersectAVX-512 vector intersection instructions on 32/64-bit integers8
9ermsEnhancedREP MOVSB/STOSBvaesVectorAES instruction set (VEX-256/EVEX)srbds-ctrlSpecial Register Buffer Data Sampling Mitigations9
10invpcidINVPCID instructionvpclmulqdqCLMUL instruction set (VEX-256/EVEX)md-clearVERW instruction clears CPU buffers10
11rtmTSX Restricted Transactional Memoryavx512-vnniAVX-512 Vector Neural Network Instructionsrtm-always-abort[101]All TSX transactions are aborted11
12rdt-m/pqmIntel Resource Director (RDT) Monitoringor AMD Platform QOS Monitoringavx512-bitalgAVX-512 BITALG instructions(reserved)12
13x87 FPU CS and DS deprecatedtme_enTotal Memory Encryption MSRs availablertm-force-abort[101]TSX_FORCE_ABORT (MSR0x10f) is available13
14mpxIntel MPX (Memory Protection Extensions)avx512-vpopcntdqAVX-512 Vector Population Count Double and Quad-wordserializeSERIALIZE instruction14
15rdt-a/pqeIntel Resource Director (RDT) Allocationor AMD Platform QOS Enforcement(fzm)[a]?hybridMixture of CPU types in processor topology (e.g.Alder Lake)15
16avx512-fAVX-512 Foundationla575-level paging (57 address bits)tsxldtrkTSX load address tracking suspend/resume instructions (TSUSLDTRK andTRESLDTRK)16
17avx512-dqAVX-512 Doubleword and Quadword InstructionsmawauThe value of userspace MPX Address-Width Adjust used by theBNDLDX andBNDSTXIntel MPX instructions in 64-bit mode(reserved)17
18rdseedRDSEED instructionpconfigPlatform configuration (Memory Encryption Technologies Instructions)18
19adxIntel ADX (Multi-Precision Add-Carry Instruction Extensions)lbrArchitectural Last Branch Records19
20smapSupervisor Mode Access Preventioncet-ibtControl flow enforcement (CET): indirect branch tracking20
21avx512-ifmaAVX-512 Integer Fused Multiply-Add Instructions(reserved)21
22(pcommit)(PCOMMIT instruction, deprecated)[103]rdpidRDPID (Read Processor ID) instruction and IA32_TSC_AUX MSRamx-bf16AMX tile computation onbfloat16 numbers22
23clflushoptCLFLUSHOPT instructionklAES Key Lockeravx512-fp16AVX-512half-precision floating-point arithmetic instructions[104]23
24clwbCLWB (Cache line writeback) instructionbus-lock-detectBus lock debug exceptionsamx-tileAMX tile load/store instructions24
25ptIntel Processor TracecldemoteCLDEMOTE (Cache line demote) instructionamx-int8AMX tile computation on 8-bit integers25
26avx512-pfAVX-512 Prefetch Instructions(mprr)[a]?ibrs / spec_ctrlSpeculation Control, part of Indirect Branch Control (IBC):
Indirect Branch Restricted Speculation (IBRS) and
Indirect Branch Prediction Barrier (IBPB)[105][106]
26
27avx512-erAVX-512 Exponential and Reciprocal InstructionsmovdiriMOVDIRI instructionstibpSingle Thread Indirect Branch Predictor, part of IBC[105]27
28avx512-cdAVX-512 Conflict Detection Instructionsmovdir64bMOVDIR64B (64-byte direct store) instructionL1D_FLUSHIA32_FLUSH_CMD MSR28
29shaSHA-1 and SHA-256 extensionsenqcmdEnqueue Stores andEMQCMD/EMQCMDS instructionsIA32_ARCH_CAPABILITIES MSR (lists speculative side channel mitigations[105])29
30avx512-bwAVX-512 Byte and Word Instructionssgx-lcSGX Launch ConfigurationIA32_CORE_CAPABILITIES MSR (lists model-specific core capabilities)30
31avx512-vlAVX-512 Vector Length ExtensionspksProtection keys for supervisor-mode pagesssbdSpeculative Store Bypass Disable,[105] as mitigation forSpeculative Store Bypass (IA32_SPEC_CTRL)31
  1. ^abcAs of April 2024, the FZM, MPRR and SGX_TEM bits are listed only in IntelTDX documentation[102] and are not set in any known processor.

EAX=7, ECX=1: Extended Features

[edit]

This returns extended feature flags in all four registers.

CPUID EAX=7,ECX=1: Extended feature bits in EAX, EBX, ECX, and EDX
BitEAXEBXECXEDXBit
ShortFeatureShortFeatureShortFeatureShortFeature
0sha512SHA-512 extensionsIntel PPIN (Protected Processor Inventory Number): IA32_PPIN_CTL (04Eh) and IA32_PPIN (04Fh) MSRs.(reserved)(reserved)0
1sm3SM3 hash extensionspbndkbTotal Storage Encryption:PBNDKB instruction and TSE_CAPABILITY (9F1h) MSR.(reserved)(reserved)1
2sm4SM4 cipher extensions(reserved)(legacy_­reduced_­isa)(X86S,[107] cancelled[108])(reserved)2
3rao-intRemote Atomic Operations on integers:AADD,AAND,AOR,AXOR instructionsCPUID­MAXVAL_­LIM_RMVIf 1, then bit 22 ofIA32_MISC_ENABLE cannot be set to 1 to limit the value returned byCPUID.(EAX=0):EAX[7:0].(reserved)(reserved)3
4avx-vnniAVX Vector Neural Network Instructions (VNNI) (VEX encoded)(reserved)(sipi64)64-bit SIPI (Startup InterProcessor Interrupt) (part of cancelled X86S)avx-vnni-int8AVX VNNI INT8 instructions4
5avx512-bf16AVX-512 instructions forbfloat16 numbers(reserved)MSR_IMM Immediate forms of theRDMSR andWRMSRNS instructionsavx-ne-convertAVX no-exception FP conversion instructions (bfloat16↔FP32 andFP16→FP32)5
6lassLinear Address Space Separation (CR4 bit 27)(reserved)(reserved)(reserved)6
7cmpccxaddCMPccXADD instructions(reserved)(reserved)(reserved)7
8archperf­monextArchitectural Performance Monitoring Extended Leaf (EAX=23h)(reserved)(reserved)amx-complexAMX support for "complex" tiles (TCMMIMFP16PS andTCMMRLFP16PS)8
9(dedup)[a]?(reserved)(reserved)(reserved)9
10fzrmFast zero-length REP MOVSB(reserved)(reserved)avx-vnni-int16AVX VNNI INT16 instructions10
11fsrsFast shortREP STOSB(reserved)(reserved)(reserved)11
12rsrcsFast shortREP CMPSB andREP SCASB(reserved)(reserved)(reserved)12
13(reserved)(reserved)(reserved)utmrUser-timer events: IA32_UINTR_TIMER (1B00h) MSR13
14(reserved)(reserved)(reserved)prefetchiInstruction-cache prefetch instructions (PREFETCHIT0 andPREFETCHIT1)14
15(reserved)(reserved)(reserved)user_msrUser-mode MSR access instructions (URDMSR andUWRMSR)15
16(reserved)(reserved)(reserved)(reserved)16
17fredFlexible Return and Event Delivery[109](reserved)(reserved)uiret-uif-from-rflagsIf 1, theUIRET (User Interrupt Return) instruction will set UIF (User Interrupt Flag) to the value of bit 1 of the RFLAGS image popped off the stack.17
18lkgsLKGS Instruction[109](reserved)(reserved)cet-sssIf 1, then Control-Flow Enforcement (CET) Supervisor Shadow Stacks (SSS) are guaranteed not to become prematurely busy as long as shadow stack switching does not cause page faults on the stack being switched to.[110][111]18
19wrmsrnsWRMSRNS instruction (non-serializing write toMSRs)(reserved)(reserved)avx10AVX10 Converged Vector ISA (see also leaf 24h)[112]19
20nmi_srcNMI source reporting[109](reserved)(reserved)(reserved)20
21amx-fp16AMX instructions forFP16 numbers(reserved)(reserved)APX_FAdvanced Performance Extensions, Foundation (adds REX2 and extendedEVEX prefix encodings to support 32 GPRs, as well as some new instructions)[113]21
22hresetHRESET instruction, IA32_HRESET_ENABLE (17DAh) MSR, and Processor History Reset Leaf (EAX=20h)(reserved)(reserved)(reserved)22
23avx-ifmaAVX IFMA instructions(reserved)(reserved)mwaitMWAIT instruction[b]23
24(reserved)(reserved)(reserved)(reserved)24
25(reserved)(reserved)(reserved)(reserved)25
26lamLinear Address Masking(reserved)(reserved)(reserved)26
27msrlistRDMSRLIST andWRMSRLIST instructions, and the IA32_BARRIER (02Fh) MSR(reserved)(reserved)(reserved)27
28(reserved)(reserved)(reserved)(reserved)28
29(reserved)(reserved)(reserved)(reserved)29
30invd_­disable_­post_­bios_doneIf 1, supportsINVD instruction execution prevention after BIOS Done.(reserved)(reserved)(reserved)30
31MOVRSMOVRS andPREFETCHRST2 instructions supported (memory read/prefetch with read-shared hint)(reserved)(reserved)(reserved)31
  1. ^As of April 2024, the DEDUP bit is listed only in IntelTDX documentation[102] and is not set in any known processor.
  2. ^Support for theMWAIT instruction may be indicated by eitherCPUID.(EAX=1).ECX[3] orCPUID.(EAX=7,ECX=1).EDX[23]. (One or both may be set.) The former indicates support for theMONITOR instruction as well, while the latter does not indicate one way or another whether theMONITOR instruction is present.MWAIT withoutMONITOR may be present in systems that support the "Monitorless MWAIT" feature (which is itself indicated byCPUID.(EAX=5).ECX[3].)

EAX=7, ECX=2: Extended Features

[edit]

This returns extended feature flags in EDX.

EAX, EBX and ECX are reserved.

CPUID EAX=7,ECX=2: Extended feature bits in EDX
BitEDX
ShortFeature
0psfdFast Store Forwarding Predictor[114] disable supported. (SPEC_CTRL (MSR48h) bit 7)
1ipred_ctrlIPRED_DIS controls[115] supported. (SPEC_CTRL bits 3 and 4)

IPRED_DIS prevents instructions at an indirect branch target from speculatively executing until the branch target address is resolved.

2rrsba_ctrlRRSBA behavior[116][115] disable supported. (SPEC_CTRL bits 5 and 6)
3ddpd_uData Dependent Prefetcher[117] disable supported. (SPEC_CTRL bit 8)
4bhi_ctrlBHI_DIS_S behavior[115] enable supported. (SPEC_CTRL bit 10)

BHI_DIS_S prevents predicted targets of indirect branches executed in ring0/1/2 from being selected based on branch history from branches executed in ring 3.

5mcdt_noIf set, the processor does not exhibitMXCSR configuration dependent timing.
6UC-lock disable feature supported.
7monitor_mitg_noIf set, indicates that theMONITOR/UMONITOR instructions are not affected by performance/power issues caused by the instructions exceeding the capacity of an internal monitor tracking table.[118]

31:8
 
(reserved)

EAX=0Dh: XSAVE Features and State Components

[edit]

This leaf is used to enumerate XSAVE features and state components.

The XSAVE instruction set extension is designed to save/restore CPU extended state (typically for the purpose ofcontext switching) in a manner that can be extended to cover new instruction set extensions without the OS context-switching code needing to understand the specifics of the new extensions. This is done by defining a series ofstate-components, each with a size and offset within a given save area, and each corresponding to a subset of the state needed for one CPU extension or another. TheEAX=0Dh CPUID leaf is used to provide information about which state-components the CPU supports and what their sizes/offsets are, so that the OS can reserve the proper amount of space and set the associated enable-bits.

The state-components can be subdivided into two groups: user-state (state-items that are visible to the application, e.g.AVX-512 vector registers), and supervisor-state (state items that affect the application but are not directly user-visible, e.g. user-mode interrupt configuration). The user-state items are enabled by setting their associated bits in theXCR0 control register, while the supervisor-state items are enabled by setting their associated bits in theIA32_XSS (0DA0h) MSR - the indicated state items then become the state-components that can be saved and restored with theXSAVE/XRSTOR family of instructions.

The XSAVE mechanism can handle up to 63 state-components in this manner. State-components 0 and 1 (x87 andSSE, respectively) have fixed offsets and sizes - for state-components 2 to 62, their sizes, offsets and a few additional flags can be queried by executingCPUID withEAX=0Dh andECX set to the index of the state-component. This will return the following items in EAX, EBX and ECX (with EDX being reserved):

CPUID EAX=0Dh, ECX≥2: XSAVE state-component information
BitEAXEBXECXBit
0Size in bytes of state-componentOffset of state-component from the start of theXSAVE/XRSTOR save area

(This offset is 0 for supervisor state-components, since these can only be saved with theXSAVES/XRSTORS instruction, which use compacting.)

User/supervisor state-component:
  • 0=user-state (enabled throughXCR0)
  • 1=supervisor-state (enabled throughIA32_XSS)
0
164-byte alignment enable when state save compaction is used.

If this bit is set for a state-component, then, when storing state with compaction, padding will be inserted between the preceding state-component and this state-component as needed to provide 64-byte alignment. If this bit is not set, the state-component will be stored directly after the preceding one.

1

31:2
 
(reserved)
31:2

Attempting to query an unsupported state-component in this manner results in EAX,EBX,ECX and EDX all being set to 0.

Sub-leaves 0 and 1 ofCPUID leaf0Dh are used to provide feature information:

CPUID EAX=0Dh,ECX=0: XSAVE features
EBXECXEDX:EAX
Maximum size (in bytes) of XSAVE save area for the set of state-components currently set inXCR0.Maximum size (in bytes) of XSAVE save area if all state-components supported byXCR0 on this CPU were enabled at the same time.64-bit bitmap of state-components supported byXCR0 on this CPU.
CPUID EAX=0Dh,ECX=1: XSAVE extended features
EAXEBXEDX:ECX
XSAVE feature flags (see below table)Size (in bytes) of XSAVE area containing all the state-components currently set inXCR0 andIA32_XSS combined.64-bit bitmap of state-components supported byIA32_XSS on this CPU.
EAX=0Dh,ECX=1: XSAVE feature flags in EAX
BitEAX
ShortFeature
0xsaveoptXSAVEOPT instruction: save state-components that have been modified since lastXRSTOR
1xsavecXSAVEC instruction: save/restore state with compaction
2xgetbv_ecx1XGETBV withECX=1 support
3xssXSAVES andXRSTORS instructions andIA32_XSS MSR: save/restore state with compaction, including supervisor state.
4xfdXFD (Extended Feature Disable) supported

31:5
 
(reserved)

As of July 2023, the XSAVE state-components that have been architecturally defined are:

XSAVE State-components
IndexDescriptionEnabled with
0x87 stateXCR0[a]
1SSE state:XMM0-XMM15 andMXCSRXCR0
2AVX state: top halves ofYMM0 toYMM15
3MPX state:BND0-BND3 bounds registers
4MPX state:BNDCFGU andBNDSTATUS registers
5AVX-512 state: opmask registersk0-k7
6AVX-512 "ZMM_Hi256" state: top halves ofZMM0 toZMM15
7AVX-512 "Hi16_ZMM" state:ZMM16-ZMM31
8Processor Trace stateIA32_XSS
9PKRU (User Protection Keys) registerXCR0
10PASID (Process Address Space ID) stateIA32_XSS
11CET_U state (Control-flow Enforcement Technology: user-mode functionality MSRs)
12CET_S state (CET: shadow stack pointers for rings 0,1,2)
13HDC (Hardware Duty Cycling) state
14UINTR (User-Mode Interrupts) state
15LBR (Last Branch Record) state
16HWP (Hardware P-state control) state
17AMX tile configuration state:TILECFGXCR0
18AMX tile data registers:tmm0-tmm7
19APX extended general-purpose registers:r16-r31[113]

20 to 61
 
(reserved)
62Lightweight Profiling (LWP) (AMD only)XCR0
63(reserved)[b]
  1. ^Bit 0 ofXCR0 is hardwired to 1, so that the XSAVE instructions will always support save/restore of x87 state.
  2. ^For theXCR0 andIA32_XSS registers, bit 63 is reserved specifically for bit vector expansion - this precludes the existence of a state-component 63.

EAX=12h: SGX Capabilities

[edit]

This leaf provides information about the supported capabilities of the IntelSoftware Guard Extensions (SGX) feature. The leaf provides multiple sub-leaves, selected with ECX.

Sub-leaf 0 provides information about supported SGX leaf functions in EAX and maximum supported SGX enclave sizes in EDX; ECX is reserved. EBX provides a bitmap of bits that can be set in the MISCSELECT field in the SECS (SGX Enclave Control Structure) - this field is used to control information written to the MISC region of the SSA (SGX Save State Area) when an AEX (SGX Asynchronous Enclave Exit) occurs.

CPUID EAX=12h,ECX=0:SGX leaf functions, MISCSELECT and maximum-sizes
BitEAXEBXEDXBit
ShortFeatureShortFeatureShortFeature
0sgx1SGX1 leaf functionsEXINFOMISCSELECT: report information about page fault and general protection exception that occurred inside enclaveMaxEnclave­Size_Not64Log2 of maximum enclave size supported in non-64-bit mode0
1sgx2SGX2 leaf functionsCPINFOMISCSELECT: report information about control protection exception that occurred inside enclave1
2(reserved)(reserved)2
3(reserved)(reserved)3
4(reserved)(reserved)4
5ossENCLV leaves:EINCVIRTCHILD,EDECVIRTCHILD, andESETCONTEXT(reserved)5
6ENCLS leaves:ETRACKC,ERDINFO,ELDBC,ELDUC(reserved)6
7ENCLU leaf:EVERIFYREPORT2(reserved)7
8(reserved)(reserved)MaxEnclave­Size_64Log2 of maximum enclave size supported in 64-bit mode8
9(reserved)(reserved)9
10ENCLS leaf:EUPDATESVN(reserved)10
11ENCLU leaf:EDECSSA(reserved)11
12(reserved)(reserved)12
13(reserved)(reserved)13
14(reserved)(reserved)14
15(reserved)(reserved)15

31:16
 
(reserved)(reserved)(reserved)
31:16
 

Sub-leaf 1 provides a bitmap of which bits can be set in the 128-bit ATTRIBUTES field of SECS in EDX:ECX:EBX:EAX (this applies to the SECS copy used as input to theENCLS[ECREATE] leaf function). The top 64 bits (given in EDX:ECX) are a bitmap of which bits can be set in the XFRM (X-feature request mask) - this mask is a bitmask of which CPU state-components (see leaf 0Dh) will be saved to the SSA in case of an AEX; this has the same layout as theXCR0 control register. The other bits are given in EAX and EBX, as follows:

CPUID EAX=12h,ECX=1:SGX settable bits in SECS.ATTRIBUTES
BitEAXEBXBit
ShortFeatureShortFeature
0(INIT)(must be 0)[a](reserved)0
1DEBUGPermit debugger to read and write enclave data usingEDBGRD andEDBGWR1
2MODE64BIT64-bit-mode enclave2
3(reserved)3
4PROVISIONKEYProvisioning key available fromEGETKEY4
5EINITTOKEN_KEYEINIT token key available fromEGETKEY5
6CETCET (Control-Flow Enforcement Technology) attributes enable6
7KSSKey Separation and Sharing7
8(reserved)8
9(reserved)9
10AEXNOTIFYThreads inside enclave may receive AEX notifications[119]10

31:11
 
(reserved)
31:11
 
  1. ^For the copy of the SECS that exists inside an exclave, bit 0 (INIT) of SECS.ATTRIBUTES is used to indicate that the enclave has been initialized withENCLS[EINIT]. This bit must be 0 in the SECS copy that is given as input toENCLS[CREATE].

Sub-leaves 2 and up are used to provide information about which physical memory regions are available for use as EPC (Enclave Page Cache) sections under SGX.

CPUID EAX=12h,ECX≥2:SGX Enclave Page Cache section information
BitsEAXEBXECXEDXBits
3:0Sub-leaf type:
  • 0000: Invalid
  • 0001: EPC section
  • other: reserved
Bits 51:32 of physical base address of EPC sectionEPC Section properties:
  • 0000: Invalid
  • 0001: Has confidentiality, integrity, and replay protection
  • 0010: Has confidentiality protection only
  • 0011: Has confidentiality and integrity protection
  • other: reserved
Bits 51:32 of size of EPC section3:0

11:4
 
(reserved)(reserved)
11:4
 

19:12
 
Bits 31:12 of physical base address of EPC sectionBits 31:12 of size of EPC section
19:12
 

31:20
 
(reserved)(reserved)
31:20
 

EAX=14h, ECX=0: Processor Trace

[edit]

This sub-leaf provides feature information for IntelProcessor Trace (also known as Real Time Instruction Trace).

The value returned in EAX is the index of the highest sub-leaf supported for CPUID with EAX=14h. EBX and ECX provide feature flags, EDX is reserved.

CPUID EAX=14h,ECX=0: Processor Trace feature bits in EBX and ECX
BitEBXECXBit
ShortFeatureShortFeature
0CR3 filtering supportedtopaoutToPA (Table of Physical Addresses) output mechanism for trace packets supported0
1Configurable PSB (Packet Stream Boundary) packet rate and Cycle-Accurate Mode (CYC packets) supportedmentryToPA tables can contain hold multiple output entries1
2IP filtering, TraceStop filtering and preservation of PT MSRs across warm reset supportedsnglrngoutSingle-Range Output scheme supported2
3MTC (Mini Time Counter) timing packets supported, and suppression of COFI (Change of Flow Instructions) packets supported.Output to Trace Transport subsystem supported3
4ptwritePTWRITE instruction supported(reserved)4
5Power Event Trace supported(reserved)5
6Preservation of PSB and PMI (performance monitoring interrupt) supported(reserved)6
7Event Trace packet generation supported(reserved)7
8TNT (Branch Taken-Not-Taken) packet generation disable supported.(reserved)8
9PTTT (Processor Trace Trigger Tracing) supported(reserved)9

30:10
 
(reserved)(reserved)
30:10
 
31(reserved)IP (Instruction Pointer) format for trace packets that contain IP payloads:
  • 0=RIP (effective-address IP)
  • 1=LIP (linear-address IP, with CS base address added)
31

EAX=15h and EAX=16h: CPU, TSC, Bus and Core Crystal Clock Frequencies

[edit]

These two leaves provide information about various frequencies in the CPU in EAX, EBX and ECX (EDX is reserved in both leaves).

CPUID EAX=15h: TSC and CoreCrystal frequency information
EAXEBXECX
Ratio of TSC frequency to Core Crystal Clock frequency, denominatorRatio of TSC frequency to Core Crystal Clock frequency, numerator[a]Core Crystal Clock frequency, in units ofHz[a]
CPUID EAX=16h: Processor and Bus specification frequencies[b]
BitsEAXEBXECXBits
15:0Processor Base Frequency (in MHz)[a]Processor Maximum Frequency (in MHz)[a]Bus/Reference frequency (in MHz)[a]15:0
31:16(reserved)(reserved)(reserved)31:16
  1. ^abcdeField not enumerated if zero.
  2. ^The frequency values reported by leaf 16h are the processor's specification frequencies - they are constant for the given processor and do not necessarily reflect the actual CPU clock speed at the time CPUID is called.

If the returned values in EBX and ECX of leaf 15h are both nonzero, then the TSC (Time Stamp Counter) frequency in Hz is given byTSCFreq = ECX*(EBX/EAX).

On some processors (e.g. IntelSkylake), CPUID_15h_ECX is zero but CPUID_16h_EAX is present and not zero. On all known processors where this is the case,[120] the TSC frequency is equal to the Processor Base Frequency, and the Core Crystal Clock Frequency in Hz can be computed asCoreCrystalFreq = (CPUID_16h_EAX * 10000000) * (CPUID_15h_EAX/CPUID_15h_EBX).

On processors that enumerate the TSC/Core Crystal Clock ratio in CPUID leaf 15h, theAPIC timer frequency will be the Core Crystal Clock frequency divided by the divisor specified by the APIC's Divide Configuration Register.[121]

EAX=17h: SoC Vendor Attribute Enumeration

[edit]

This leaf is present in systems where an x86 CPUIP core is implemented in an SoC (System on chip) from another vendor - whereas the other leaves ofCPUID provide information about the x86 CPU core, this leaf provides information about the SoC. This leaf takes a sub-leaf index in ECX.

Sub-leaf 0 returns a maximum sub-leaf index in EAX (at least 3), and SoC identification information in EBX/ECX/EDX:

CPUID EAX=17h,ECX=0: SoC identification information
BitEBXECXEDXBit
15:0SoC Vendor IDSoC Project IDSoC Stepping ID within an SoC project15:0
16SoC Vendor ID scheme
  • 0 : Vendor IDs assigned by Intel[a]
  • 1 : Industry standard enumeration scheme[b]
16
31:17(reserved)31:17
  1. ^As of May 2024, the following Vendor IDs are known to have been assigned by Intel:
    IDVendor
    1Spreadtrum[122]
  2. ^As of May 2024, Intel documentation does not specify which "Industry Standard" enumeration scheme to use for the Vendor ID in EBX[15:0] if EBX[16] is set.

Sub-leaves 1 to 3 return a 48-byte SoC vendor brand string inUTF-8 format. Sub-leaf 1 returns the first 16 bytes in EAX,EBX,ECX,EDX (in that order); sub-leaf 2 returns the next 16 bytes and sub-leaf 3 returns the last 16 bytes. The string is allowed but not required to benull-terminated.

EAX=19h: Intel Key Locker Features

[edit]

This leaf provides feature information for Intel Key Locker in EAX, EBX and ECX. EDX is reserved.

CPUID EAX=19h: Key Locker feature bits in EAX, EBX and ECX
BitEAXEBXECXBit
ShortFeatureShortFeatureShortFeature
0Key Locker restriction of CPL0-only supportedaes_kleAES "Key Locker" Instructions enabledNo-backup parameter toLOADIWKEY supported0
1Key Locker restriction of no-encrypt supported(reserved)KeySource encoding of 1 (randomization of internal wrapping key) supported1
2Key Locker restriction of no-decrypt supportedaes_wide_klAES "Wide Key Locker" Instructions(reserved)2
3(Process Restriction)[a](reserved)(reserved)3
4(reserved)kl_msrs"Key Locker" MSRs(reserved)4

31:5
 
(reserved)(reserved)(reserved)
31:5
 
  1. ^As of April 2024, the "Process Restriction" bit is listed only in IntelTDX documentation[102] and is not set in any known processor.


EAX=1Dh: Tile Information

[edit]

WhenECX=0, the highest supported "palette" subleaf is enumerated in EAX. WhenECX≥1, information on paletten is returned.

CPUID EAX=1Dh,ECX≥1: Tile Paletten Information
BitsEAXEBXECXEDXBits
ShortFeatureShortFeatureShortFeatureShortFeature
15:0total_tile_bytesSize of all tile registers, in bytes (8192)bytes_per_row(64)max_rows(16)(reserved)15:0
31:16bytes_per_tileSize of one tile, in bytes (1024)max_namesNumber of tile registers (8)(reserved)(reserved)31:16

EAX=1Eh, ECX=0:TMUL Information

[edit]

This leaf returns information on theTMUL (tile multiplier) unit.

CPUID EAX=1Eh,ECX=0:TMUL Information
BitsEAXEBXECXEDXBits
ShortFeatureShortFeatureShortFeatureShortFeature
7:0(reserved)tmul_maxkMaximum number of rows or columns (16)(reserved)(reserved)7:0
15:8(reserved)tmul_maxnMaximum number of bytes per column (64)(reserved)(reserved)15:8
23:16(reserved)(reserved)(reserved)(reserved)23:16
31:24(reserved)(reserved)(reserved)(reserved)31:24

EAX=1Eh, ECX=1:TMUL Information

[edit]

This leaf returns feature flags on theTMUL (tile multiplier) unit.

CPUID EAX=1Eh,ECX=0:TMUL Information
BitsEAXEBXECXEDXBits
ShortFeatureShortFeatureShortFeatureShortFeature
0amx-int88-bit integer support(reserved)(reserved)(reserved)0
1amx-bf16bfloat16 support(reserved)(reserved)(reserved)1
2amx-complexComplex number support(reserved)(reserved)(reserved)2
3amx-fp16float16 support(reserved)(reserved)(reserved)3
4amx-fp8float8 support(reserved)(reserved)(reserved)4
5amx-transposeTransposition instruction support(reserved)(reserved)(reserved)5
6amx-tf32tf32/fp19 support(reserved)(reserved)(reserved)6
7amx-avx512AMX-AVX512 support(reserved)(reserved)(reserved)7
8amx-movrsAMX-MOVRS support(reserved)(reserved)(reserved)8
31:9(reserved)(reserved)(reserved)(reserved)31:9


EAX=21h: Reserved for TDX enumeration

[edit]

When Intel TDX (Trust Domain Extensions) is active, attempts to execute theCPUID instruction by a TD (Trust Domain) guest will be intercepted by the TDX module.This module will, whenCPUID is invoked withEAX=21h andECX=0 (leaf21h, sub-leaf 0), return the index of the highest supported sub-leaf for leaf21h inEAX and a TDX module vendor ID string as a 12-byte ASCII string in EBX,EDX,ECX (in that order). Intel's own module implementation returns the vendor ID string"IntelTDX    " (with four trailing spaces)[123] - for this module, additional feature information is not available throughCPUID and must instead be obtained through the TDX-specificTDCALL instruction.

This leaf is reserved in hardware and will (on processors whose highest basic leaf is21h or higher) return 0 in EAX/EBX/ECX/EDX when run directly on the CPU.

EAX=24h, ECX=0: AVX10 Converged Vector ISA

[edit]

This returns a maximum supported sub-leaf in EAX and AVX10 feature information in EBX.[112] (ECX and EDX are reserved.)

CPUID EAX=24h, ECX=0: AVX10 feature bits in EBX
BitEBX
ShortFeature
7:0AVX10 Converged Vector ISA version (≥1)
16:8(reserved)
17avx10-256256-bit vector support is present
18avx10-512512-bit vector support is present
31:19(reserved)

EAX=24h, ECX=1: Discrete AVX10 Features

[edit]

Subleaf 1 is reserved for AVX10 features not bound to a version. None are currently defined.

EAX=2000'0000h: Highest Xeon Phi Function Implemented

[edit]

The highest function is returned in EAX.This leaf is only present onXeon Phi processors.[124]

EAX=2000'0001h: Xeon Phi Feature Bits

[edit]

This function returns feature flags.

CPUID EAX=2000'0001h: Xeon Phi feature bits
BitEAXEBXECXEDXBit
ShortFeatureShortFeatureShortFeatureShortFeature
3:0(reserved)(reserved)(reserved)(reserved)3:0
4(reserved)(reserved)(reserved)k1omK1OM[124]4
31:5(reserved)(reserved)(reserved)(reserved)31:5

EAX=4000'0000h-4FFFF'FFFh: Reserved forHypervisors

[edit]

When theCPUID instruction is executed underIntel VT-x or AMD-v virtualization, it will be intercepted by the hypervisor, enabling the hypervisor to returnCPUID feature flags that differ from those of the underlying hardware.CPUID leaves40000000h to4FFFFFFFh are not implemented in hardware, and are reserved for use by hypervisors to provide hypervisor-specific identification and feature information through this interception mechanism.

For leaf40000000h, the hypervisor is expected to return the index of the highest supported hypervisor CPUID leaf in EAX, and a 12-character hypervisor ID string in EBX,ECX,EDX (in that order). For leaf40000001h, the hypervisor may return an interface identification signature in EAX - e.g. hypervisors that wish to advertise that they areHyper-V compatible may return0x31237648"Hv#1" in EAX.[125][126] The formats of leaves40000001h and up to the highest supported leaf are otherwise hypervisor-specific. Hypervisors that implement these leaves will normally also set bit 31 of ECX for CPUID leaf 1 to indicate their presence.

Hypervisors that expose more than one hypervisor interface may provide additional sets of CPUID leaves for the additional interfaces, at a spacing of100h leaves per interface. For example, whenQEMU is configured to provide bothHyper-V andKVM interfaces, it will provide Hyper-V information starting from CPUID leaf40000000h and KVM information starting from leaf40000100h.[127][128]

Some hypervisors that are known to return a hypervisor ID string in leaf40000000h include:

CPUID EAX=4000'0x00h: 12-character Hypervisor ID string in EBX,ECX,EDX
HypervisorID String (ASCII)Notes
MicrosoftHyper-V,
Windows Virtual PC
"Microsoft Hv"[125]
LinuxKVM"KVMKVMKVM\0\0\0"[129]\0 denotes an ASCII NUL character.
"Linux KVM Hv"[130]Hyper-V emulation[131]
bhyve"BHyVE BHyVE ",
"bhyve bhyve "
ID string changed from mixed-case to lower-case in 2013.[132]

Lower-case string also used in bhyve-derived hypervisors such as xhyve and HyperKit.[133]

Xen"XenVMMXenVMM"[134]Only when using HVM (hardware virtual machine) mode.
QEMU"TCGTCGTCGTCG"[135]Only when the TCG (Tiny Code Generator) is enabled.
Parallels" lrpepyh  vr"(it possibly should be "prl hyperv", but it is encoded as " lrpepyh vr" due to anendianness mismatch)[citation needed]
VMware"VMwareVMware"[136]
Project ACRN"ACRNACRNACRN"[137]
VirtualBox"VBoxVBoxVBox"[138]Only when configured to use the "hyperv" paravirtualization provider.
QNX Hypervisor"QXNQSBMV"The QNX hypervisor detection method provided in the official QNX documentation[139] checks only the first 8 characters of the string, as provided in EBX and ECX (including an endianness swap) - EDX is ignored and may take any value.
NetBSD NVMM"___ NVMM ___"[140]
OpenBSD VMM"OpenBSDVMM58"[141]
Jailhouse"Jailhouse\0\0\0"[142]\0 denotes an ASCII NUL character.
Intel HAXM"HAXMHAXMHAXM"[143]Project discontinued.
Intel KGT (Trusty)"EVMMEVMMEVMM"[144]On "trusty" branch of KGT only, which is used for theIntel x86 Architecture Distribution of Trusty OS (archive)

(KGT also returns a signature inCPUID leaf 3: ECX=0x4D4D5645 "EVMM" and EDX=0x43544E49 "INTC")

Unisys s-Par"UnisysSpar64"[145]
Lockheed Martin LMHS"SRESRESRESRE"[146]

EAX=8000'0000h: Highest Extended Function Implemented

[edit]

The highest calling parameter is returned in EAX.

EBX/ECX/EDX return the manufacturer ID string (same as EAX=0) on AMD but not Intel CPUs.

EAX=8000'0001h: Extended Processor Info and Feature Bits

[edit]

This returns extended feature flags in EDX and ECX.

Many of the bits inEDX (bits 0 through 9, 12 through 17, 23, and 24) are duplicates ofEDX from theEAX=1 leaf - these bits are highlighted in light yellow. (These duplicated bits are present on AMD but not Intel CPUs.)

AMD feature flags are as follows:[147][148]

CPUID EAX=8000'0001h: Feature bits in EDX and ECX
BitEDXECXBit
ShortFeatureShortFeature
0fpuOnboardx87 FPUlahf_lmLAHF/SAHF in long mode0
1vmeVirtual mode extensions (VIF)cmp_legacyHyperthreading not valid1
2deDebugging extensions (CR4 bit 3)svmSecure Virtual Machine2
3psePage Size ExtensionextapicExtendedAPIC space3
4tscTime Stamp Countercr8_legacyCR8 in 32-bit mode4
5msrModel-specific registersabm/lzcntAdvanced bit manipulation(LZCNT andPOPCNT)5
6paePhysical Address Extensionsse4aSSE4a6
7mceMachine Check ExceptionmisalignsseMisalignedSSE mode7
8cx8CMPXCHG8B (compare-and-swap) instruction3dnowprefetchPREFETCH andPREFETCHW instructions8
9apicOnboardAdvanced Programmable Interrupt ControllerosvwOS Visible Workaround9
10(syscall)[a](SYSCALL/SYSRET, K6 only)ibsInstruction Based Sampling10
11syscall[b]SYSCALL andSYSRET instructionsxopXOP instruction set11
12mtrrMemory Type Range RegistersskinitSKINIT/STGI instructions12
13pgePage Global Enable bit inCR4wdtWatchdog timer13
14mcaMachine check architecture(reserved)14
15cmovConditional move andFCMOV instructionslwpLight Weight Profiling[152]15
16pat[c]Page Attribute Tablefma44-operand fused multiply-add instructions16
17pse3636-bit page size extensiontceTranslation Cache Extension17
18(reserved)(reserved)18
19ecc"Athlon MP" / "Sempron" CPU brand identification[d]nodeid_msrNodeID MSR (C001_100C)[157]19
20nxNX bit(reserved)20
21(reserved)tbmTrailing Bit Manipulation21
22mmxextExtended MMXtopoextTopology Extensions22
23mmxMMX instructionsperfctr_coreCore performance counter extensions23
24fxsr[c]FXSAVE,FXRSTOR instructions,CR4 bit 9perfctr_nbNorthbridge performance counter extensions24
25fxsr_optFXSAVE/FXRSTOR optimizations(StreamPerfMon)(Streaming performance monitor architecture)[e]25
26pdpe1gbGigabyte pagesdbxData breakpoint extensions26
27rdtscpRDTSCP instructionperftscPerformance timestamp counter (PTSC)27
28(reserved)pcx_l2iL2I perf counter extensions28
29lmLong modemonitorxMONITORX andMWAITX instructions29
303dnowextExtended 3DNow!addr_mask_extAddress mask extension to 32 bits for instruction breakpoints30
313dnow3DNow!(reserved)31
  1. ^The use of EDX bit 10 to indicate support forSYSCALL/SYSRET is only valid onAuthenticAMDFamily 5 Model 7 CPUs (AMD K6, 250nm "Little Foot") - for all other processors, EDX bit 11 should be used instead.

    These instructions were first introduced on Model 7[149] - the CPUID bit to indicate their support was moved[150] to EDX bit 11 from Model 8 (AMD K6-2) onwards.

  2. ^On Intel CPUs, the CPUID bit forSYSCALL/SYSRET is only set if theCPUID instruction is executed in 64-bit mode.[151]
  3. ^abOn some processors - CyrixMediaGXm,[153] severalGeodes (NatSemi Geode GXm, GXLV, GX1; AMD Geode GX1[154]) andTransmeta Crusoe[155] - EDX bits 16 and 24 have a different meaning:
    • Bit 16: Floating-point Conditional Move (FCMOV) supported
    • Bit 24: 6x86MXExtended MMX instructions supported
  4. ^EDX bit 19 is used for CPU brand identification onAuthenticAMDFamily 6 processors only - the bit is, combined with processor signature andFSB speed, used to identify processors as either multiprocessor-capable or carrying theSempron brand name.[156]
  5. ^ECX bit 25 is listed as StreamPerfMon in revision 3.20 of AMD APM[158] only - it is listed as reserved in later revisions. The bit is set on Excavator and Steamroller CPUs only.

EAX=8000'0002h,8000'0003h,8000'0004h: Processor Brand String

[edit]

These return the processor brand string in EAX, EBX, ECX and EDX.CPUID must be issued with each parameter in sequence to get the entire 48-byte ASCII processor brand string.[159] It is necessary to check whether the feature is present in the CPU by issuingCPUID withEAX = 80000000h first and checking if the returned value is not less than80000004h.

The string is specified in Intel/AMD documentation to benull-terminated, however this is not always the case (e.g. DM&PVortex86DX3 and AMDRyzen 7 6800HS are known to return non-null-terminated brand strings in leaves80000002h-80000004h[160][161]), and software should not rely on it.

#include<stdio.h>#include<string.h>#include<cpuid.h>intmain(){unsignedintregs[12];charstr[sizeof(regs)+1];__cpuid(0x80000000,regs[0],regs[1],regs[2],regs[3]);if(regs[0]<0x80000004)return1;__cpuid(0x80000002,regs[0],regs[1],regs[2],regs[3]);__cpuid(0x80000003,regs[4],regs[5],regs[6],regs[7]);__cpuid(0x80000004,regs[8],regs[9],regs[10],regs[11]);memcpy(str,regs,sizeof(regs));str[sizeof(regs)]='\0';printf("%s\n",str);return0;}

On AMD processors, from180nm Athlon onwards (AuthenticAMD Family 6 Model 2 and later), it is possible to modify the processor brand string returned by CPUID leaves80000002h-80000004h by using theWRMSR instruction to write a 48-byte replacement string to MSRsC0010030h-C0010035h.[156][162] This can also be done on AMD Geode GX/LX, albeit using MSRs300Ah-300Fh.[163]

In some cases, determining the CPU vendor requires examining not just the Vendor ID in CPUID leaf 0 and the CPU signature in leaf 1, but also the Processor Brand String in leaves80000002h-80000004h. Known cases include:

  • Montage Jintide CPUs can be distinguished from the Intel Xeon CPU models they're based on by the presence of the substringMontage in the brand string of the Montage CPUs (e.g. Montage Jintide C2460[164] and Intel Xeon Platinum 8160[165] - both of which identify themselves asGenuineIntel Family 6 Model 55h Stepping 4 - can be distinguished in this manner.)
  • CentaurHauls Family 6 CPUs may be either VIA or Zhaoxin CPUs - these can be distinguished by the presence of the substringZHAOXIN in the brand string of the Zhaoxin CPUs (e.g. Zhaoxin KaiXian ZX-C+ C4580[166] and VIA Eden X4 C4250[167] - both of which identify themselves asCentaurHauls Family 6 Model 0Fh Stepping 0Eh - can be distinguished in this manner.)

EAX=8000'0005h: L1 Cache and TLB Identifiers

[edit]

This provides information about the processor's level-1 cache andTLB characteristics in EAX, EBX, ECX and EDX as follows:[a]

  • EAX: information about L1 hugepage TLBs (TLBs that hold entries corresponding to 2M/4M pages)[b]
  • EBX: information about L1 small-page TLBs (TLBs that hold entries corresponding to 4K pages)
  • ECX: information about L1 data cache
  • EDX: information about L1 instruction cache
CPUID EAX=8000'0005h: L1 Cache/TLB information in EAX,EBX,ECX,EDX
BitsEAXEBXECXEDXBits
7:0Number of instruction TLB entries[c]Cache line size in bytes7:0
15:8instruction TLB associativity[d]Number of cache lines per tag15:8
23:16Number of data TLB entries[c]Cache associativity[d]23:16
31:24Data TLB associativity[d]Cache size in kilobytes31:24
  1. ^On some older Cyrix and Geode CPUs (specifically,CyrixInstead/Geode by NSC Family 5 Model 4 CPUs only), leaf80000005h exists but has a completely different format, similar to that of leaf 2.[168]
  2. ^On processors that can only handle small-pages in their TLBs, this leaf will return 0 in EAX. (On such processors, which include e.g. AMD K6 and Transmeta Crusoe, hugepage entries in the page-tables are broken up into 4K pages as needed upon entry into the TLB.)
    On some processors, e.g. VIACyrix III "Samuel",[169] this leaf returns0x80000005 in EAX. This has the same meaning as EAX=0, i.e. no hugepage TLBs.
  3. ^abOn Transmeta CPUs, the valueFFh is used to indicate a 256-entry TLB.
  4. ^abcFor the associativity fields of leaf80000005h, the following values are used:
    ValueMeaning
    0(reserved)
    1Direct-mapped
    2 toFEhN-way set-associative (field encodes N)
    FFhFully-associative

EAX=8000'0006h: Extended L2 Cache Features

[edit]

Returns details of the L2 cache in ECX, including the line size in bytes (Bits 07 - 00), type of associativity (encoded by a 4 bits field; Bits 15 - 12) and the cache size in KB (Bits 31 - 16).

#include<stdio.h>#include<cpuid.h>intmain(){unsignedinteax,ebx,ecx,edx;unsignedintlsize,assoc,cache;__cpuid(0x80000006,eax,ebx,ecx,edx);lsize=ecx&0xff;assoc=(ecx>>12)&0x07;cache=(ecx>>16)&0xffff;printf("Line size: %d B, Assoc. type: %d, Cache size: %d KB.\n",lsize,assoc,cache);return0;}

EAX=8000'0007h: Processor Power Management Information and RAS Capabilities

[edit]

This function provides information about power management, power reporting and RAS (Reliability, availability and serviceability) capabilities of the CPU.

CPUID EAX=8000'0007h: RAS features in EBX and power management features in EDX
BitEBXEDXBit
ShortFeatureShortFeature
0MCAOverflowRecovMCA (Machine Check Architecture) overflow recovery supportTSTemperature Sensor0
1SUCCORSoftware uncorrectable error containment and recovery capabilityFIDFrequency ID Control1
2HWAHardware assert support (MSRsC001_10C0 toC001_10DFVIDVoltage ID Control2
3ScalableMcaScalable MCA supportedTTPTHERMTRIP3
4(reserved)TMHardware thermal control (HTC) supported4
5(reserved)STCSoftware thermal control (STC) supported[170]5
6(reserved)100MHzSteps100 MHz multiplier control6
7(reserved)HwPstateHardware P-state control (MSRsC001_0061 toC001_0063)7
8(reserved)TscInvariantInvariant TSC - TSC (Time Stamp Counter) rate is guaranteed to be invariant across all P-states, C-states and sop grant transitions.8
9(reserved)CPBCore Performance Boost9
10(reserved)EffFreqRORead-only effective frequency interface (MSRsC000_00E7 andC000_00E8)10
11(reserved)ProcFeedback­InterfaceProcessor Feedback Interface supported11
12(reserved)ProcPower­ReportingProcessor power reporting interface supported12
13(reserved)Connected­StandbyConnected Standby[171]13
14(reserved)RAPLRunning Average Power Limit[171]14
15(reserved)FastCPPCFast CPPC (Collaborative Processor Performance Control) supported[171]15

31:16
 
(reserved)(reserved)
31:16
 
CPUID EAX=8000'0007h: Processor Feedback info in EAX and power monitoring interface info in ECX
BitsEAXECXBits
ShortFeatureShortFeature
7:0NumberOfMonitorsNumber of Processor Feedback MSR pairs available, starting from MSRC001_0080 onwards[172]CpuPwrSample­TimeRatioRatio of compute unit power accumulator sample period to TSC counter period.7:0
15:8VersionProcessor Feedback Capabilities version15:8
31:16MaxWrapTimeMaximum time between reads (in milliseconds) that software should use to avoid two wraps.31:16

EAX=8000'0008h: Virtual and Physical Address Sizes

[edit]
CPUID EAX=8000'0008h: Feature bits in EBX
BitEBX
ShortFeature
0clzeroCLZERO instruction
1retired_instrRetired instruction count MSR (C000_00E9h) supported
2xrstor_fp_errXRSTOR restores FP errors
3invlpgbINVLPGB andTLBSYNC instructions
4rdpruRDPRU instruction
5(reserved)
6mbeMemory Bandwidth Enforcement
7(reserved)
8mcommitMCOMMIT instruction
9wbnoinvdWBNOINVD instruction
10(reserved)
11(reserved)
12IBPBIndirect Branch Prediction Barrier (performed by writing 1 to bit 0 ofPRED_CMD (MSR049h))
13wbinvd_intWBINVD andWBNOINVD are interruptible
14IBRSIndirect Branch Restricted Speculation
15STIBPSingle Thread Indirect Branch Prediction mode
16IbrsAlwaysOnIBRS mode has enhanced performance and should be left always on
17StibpAlwaysOnSTIBP mode has enhanced performance and should be left always on
18ibrs_preferredIBRS preferred over software
19ibrs_same_mode_protectionIBRS provides Same Mode Protection
20no_efer_lmsleEFER.LMSLE is unsupported[a]
21invlpgb_nestedINVLPGB support for nested pages
22(reserved)
23ppinProtected Processor Inventory Number -

PPIN_CTL (C001_02F0) andPPIN (C001_02F1) MSRs are present[171]

24ssbdSpeculative Store Bypass Disable
25ssbd_legacySpeculative Store Bypass Disable Legacy
26ssbd_noSpeculative Store Bypass Disable Not Required
27cppcCollaborative Processor Performance Control
28psfdPredictive Store Forward Disable
29btc_noBranch Type Confusion: Processor not affected
30IBPB_RETIBPB (see bit 12) also clears return address predictor
31branch_samplingBranch Sampling Support[174]
CPUID EAX=8000'0008h: Size and range fields in EAX, ECX, EDX
BitsEAXECXEDXBits
7:0Number of Physical Address BitsNumber of Physical Threads in processor (minus 1)Maximum page count forINVLPGB instruction7:0
11:8Number of Linear Address Bits(reserved)11:8
15:12APIC ID Size15:12
17:16Guest Physical Address Size[b]Performance Timestamp Counter sizeMaximum ECX value recognized byRDPRU instruction17:16
23:18(reserved)23:18
31:24(reserved)31:24
  1. ^The LMSLE (Long Mode Segment Limit Enable) feature does not have its own CPUID flag and is detected by checking CPU family and model. It was introduced inAuthenticAMD Family 0Fh Model 14h[173] (90nm Athlon64/Opteron) CPUs and is present in all later AMD CPUs - except the ones with the 'no_efer_lmsle' flag set.
  2. ^A value of 0 indicates that the "Guest Physical Address Size" is the same as the "Number Of Physical Address Bits", specified in EAX[7:0].

EAX=8000'000Ah: SVM features

[edit]

This leaf returns information about AMD SVM (Secure Virtual Machine) features in EAX, EBX and EDX.

CPUID EAX=8000'000Ah: SVM information in EAX, EBX and ECX
BitsEAXEBXECXBits
7:0SVM Revision NumberNumber of available ASIDs
(address space identifiers)
(reserved)7:0
8(hypervisor)[a]8
31:9(reserved)31:9
CPUID EAX=8000'000Ah: SVM feature flags in EDX
BitEDX
ShortFeature
0NPRapid Virtualization Indexing (Nested Paging)
1LbrVirtLBR (Last Branch Records) virtualization
2SVMLSVM-Lock
3NRIPSnRIP (next sequential instruction pointer) save on #VMEXIT supported
4TscRateMsrMSR-basedTSC rate control (MSRC000_0104h)
5VmcbCleanVMCB (Virtual Machine Control Block) clean bits supported
6FlushByAsidTLB flush events (e.g.CR3 writes,CR4.PGE toggles) only flush the TLB entries of the current ASID (address space ID)
7DecodeAssistDecode assists supported
8PmcVirtPMC (Performance Monitoring Counters) virtualization
9(SseIsa10Compat)[b](reserved)
10PauseFilterPAUSE intercept filter supported
11(reserved)
12PauseFilter­ThresholdPAUSE filter cycle count threshold supported
13AVICAMD Advanced Virtualized Interrupt Controller supported
14(reserved)
15VMSAVEvirtVMSAVE andVMLOAD virtualization
16VGIFGlobal Interrupt Flag (GIF) virtualization
17GMETGuest Mode Execution Trap
18x2AVICx2APIC mode supported for AVIC
19SSSCheckSVM Supervisorshadow stack restrictions
20SpecCtrlSPEC_CTRL (MSR2E0h) virtualization
21ROGPTRead-Only Guest Page Table supported
22(reserved)
23HOST_MCE_­OVERRIDEGuest modeMachine-check exceptions when hostCR4.MCE=1 and guestCR4.MCE=0 cause intercepts instead of shutdowns
24TlbiCtlINVLPGB/TLBSYNC hypervisor enable in VMCB andTLBSYNC intercept support
25VNMINMI (Non-Maskable interrupt) virtualization
26IbsVirtIBS (Instruction-Based Sampling) virtualization
27ExtLvtOffset­FaultChgRead/Write fault behavior for extended LVT offsets (APIC addresses0x500-0x530) changed to Read Allowed, Write #VMEXIT[181]
28VmcbAddr­ChkChgVMCB address check change[181]
29BusLock­ThresholdBus Lock Threshold
30IdleHlt­InterceptIdle HLT (HLT instruction executed while no virtual interrupt is pending) intercept
31Enhanced­Shutdown­InterceptSupport for EXITINFO1 on shutdown intercept, and nested shutdown intercepts will result in a non-interceptible shutdown.[182]
  1. ^Early revisions of AMD's "Pacifica" documentation listed EAX bit 8 as an always-zero bit reserved for hypervisor use.[175]

    Later AMD documentation, such as #25481 "CPUID specification" rev 2.18[176] and later, only lists the bit as reserved.

    In rev 2.30[177] and later, a different bit is listed as reserved for hypervisor use:CPUID.(EAX=1):ECX[bit 31].

  2. ^EDX bit 9 is briefly listed in some older revisions of AMD's document #25481 "CPUID Specification", and is set only in some AMDBobcat CPUs.[178]

    Rev 2.28 of #25481 lists the bit as "Ssse3Sse5Dis"[179] - in rev 2.34, it is listed as having been removed from the spec at rev 2.32 under the name "SseIsa10Compat".[180]

EAX=8000'001Fh: Encrypted Memory Capabilities

[edit]
CPUID EAX=8000'001Fh: Encrypted Memory feature bits in EAX
BitEAX
ShortFeature
0SMESecure Memory Encryption
1SEVSecure Encrypted Virtualization
2PageFlushMSRPage flush MSR (C001_011Eh) supported
3SEV-ESSEV Encrypted State
4SEV-SNPSEV Secure Nested Paging
5VMPLVM Privilege Levels
6RMPQUERYRMPQUERY instruction supported
7VmplSSSVMPL Supervisorshadow stack supported
8SecureTSCSecureTSC supported
9TscAux­VirtualizationVirtualization ofTSC_AUX MSR (C000_0103) supported
10HwEnfCacheCohHardware cache coherency across encryption domains enforced
1164BitHostSEV Guest execution only allowed from 64-bit host
12Restricted­InjectionSEV-ES guests can refuse all event-injections except #HV (Hypervisor Injection Exception)
13Alternate­InjectionSEV-ES guests can use an encrypted VMCB field for event-injection
14DebugVirtFull debug state virtualization supported for SEV-ES and SEV-SNP guests
15PreventHostIBSPrevent host IBS for a SEV-ES guest
16VTEVirtual Transparent Encryption for SEV
17Vmgexit­ParameterVMGEXIT parameter is supported (using the RAX register)
18VirtualTomMsrVirtual TOM (top-of-memory) MSR (C001_0135) supported
19IbsVirtGuestCtlIBS virtualization is supported for SEV-ES and SEV-SNP guests
20PmcVirtGuestCtlPMC virtualization is supported for SEV-ES and SEV-SNP guests
21RMPREADRMPREAD instruction supported
22GuestIntercept­ControlGuest Intercept control supported for SEV-ES guests
23SegmentedRmpSegmented RMP (Reverse-Map Table) supported
24VmsaRegProtVMSA (VM Save Area) register protection supported
25SmtProtectionSMT Protection supported
26SecureAvicSecure AVIC supported
27AllowedSEV­featuresALLOWED_SEV_FEATURES_MASK field in VMCB (offset138h) supported
28SVSMComm­PageMSRSVSM (Secure VM Service Module[183]) communication page MSR (C001_F000h) supported
29NestedVirt­SnpMsrVIRT_RMPUPDATE (C001_F001h) andVIRT_PSMASH (C001_F002h) MSRs supported
30HvInUse­WrAllowedWrites to Hypervisor-owned paged allowed when marked in-use
31IbpbOnEntryIBPB on entry to virtual machine supported
CPUID EAX=8000'001Fh: Encrypted Memory feature information in EBX, ECX and EDX
BitsEBXECXEDXBits
5:0C-bit (encryption enable bit) location in page table entryMaximum ASID value that can be used for a SEV-enabled guest (maximum number of encrypted guests that can be supported simultaneously)Minimum ASID value for a guest that is SEV-enabled but not SEV-ES-enabled5:0
11:6Physical address width reduction when memory encryption is enabled11:6
15:12Number of VMPLs (VM Privilege Levels) supported15:12
31:16(reserved)31:16

EAX=8000'0021h: Extended Feature Identification

[edit]
CPUID EAX=8000'0021h: Extended feature bits in EAX
BitEAX
ShortFeature
0NoNestedDataBpProcessor ignores nested data breakpoints
1FsGsKernelGsBase­NonSerializingWRMSR to theFS_BASE,GS_BASE andKernelGSBase MSRs is non-serializing[184]
2LFenceAlways­SerializingLFENCE is always dispatch serializing
3SmmPgCfgLockSMM paging configuration lock supported
4(reserved)
5(reserved)
6NullSelect­ClearsBaseNull segment selector loads also clear the destination segment register base and limit
7UpperAddress­IgnoreUpper Address Ignore is supported
8AutomaticIBRSAutomatic IBRS
9NoSmmCtlMSRSMM_CTL MSR (C0010116h) is not supported
10FSRSFast shortREP STOSB supported
11FSRCFast shortREPE CMPSB supported
12PMC2Precise­RetirePreciseRetire performance counter control bit (MSRC0010002h bit 43) supported[182]
13PrefetchCtlMsrPrefetchControl MSR (C0000108h) is supported
14L2TlbSIzeX32If set, L2 TLB sizes (leaf80000006h) are encoded as multiples of 32
15AMD_ERMSBProcessor supports AMD implementation of EnhancedREP MOVSB andREP STOSB
16OPCODE_0F017_­RECLAIMReserves opcode0F 01 /7 for AMD use, returning #UD.[182]
17CpuidUserDisCPUID disable for non-privileged software (#GP)
18EPSFEnhanced Predictive Store Forwarding supported[184]
19FAST_REP_SCASBFast ShortREP SCASB supported
20PREFETCHIInstruction Cache prefetch instructions supported
21FP512_­DOWNGRADEDowngrade of 512-bit datapath to 256-bit supported.[a]
22WL_CLASS_­SUPPORTSupport for workload-based heuristic feedback to OS for scheduling decisions
23(reserved)
24ERAPSEnhanced Return Address Predictor Security (see also EBX[23:16] "RapSize")
25(reserved)
26(reserved)
27SBPBSelective Branch Predictor Barrier supported[186]
28IBPB_BRTYPEIBPB flushes all branch type predictions[186]
29SRSO_NOCPU is not subject to SRSO (Speculative Return Stack Overflow) vulnerability[186]
30SRSO_USER_­KERNEL_NOCPU is not subject to SRSO vulnerability across user/kernel boundary[186]
31SRSO_MSR_FIXSRSO can be mitigated by setting bit 4 of BP_CFG (MSR C001_102E)[186]
  1. ^If the downgrade from 512-bit to 256-bit datapath is enabled, then AVX-512 instructions that work on 512-bit data items will be split into two 256-bit parts that will be issued over two consecutive cycles. This datapath downgrade can help improve power efficiency for some workloads.[185]
CPUID EAX=8000'0021h: Extended feature information in EBX
BitEBX
ShortFeature
15:0MicrocodePatchSizeThe size of the Microcode patch in 16-byte multiples. If 0, the size of the patch is at most 5568 (15C0h) bytes
23:16RapSizeReturn Address Predictor Size.
RapSize * 8 is the minimum number ofCALL instructions without matchingRET instructions that are needed to flush the Return Address Predictor.
31:24(reserved)

EAX=8FFF'FFFFh: AMD Easter Egg

[edit]

Several AMD CPU models will, for CPUID withEAX=8FFFFFFFh, return an Easter Egg string in EAX, EBX, ECX and EDX.[187][188] Known Easter Egg strings include:

ProcessorString
AMD K6NexGen‍erationAMD
AMD K8IT'SHAMMER TIME
AMD Jaguar[189]HELLO KITTY! ^-^

EAX=C000'0000h: HighestCentaur Extended Function

[edit]

Returns index of highest Centaur leaf in EAX. If the returned value in EAX is less thanC0000001h, then Centaur extended leaves are not supported.

Present in CPUs fromVIA andZhaoxin.

On IDTWinChip CPUs (CentaurHauls Family 5), the extended leavesC0000001h-C0000005h do not encode any Centaur-specific functionality but are instead aliases of leaves80000001h-80000005h.[190]

EAX=C000'0001h: Centaur Feature Information

[edit]

This leaf returns Centaur feature information (mainlyVIA/Zhaoxin PadLock) in EDX.[191][192][193][194] (EAX, EBX and ECX are reserved.)

CPUID EAX=C000'0001h: Centaur feature bits in EDX
BitEDX
ShortFeature
0sm2[a]GMISM2 instruction present
1sm2_en[a]SM2 enabled
2rngPadLockRNG present:XSTORE andREP XSTORE instructions
3rng_enRNG enabled
4ccs[a]GMISM3/SM4 instructions present:CCS_HASH andCCS_ENCRYPT
5ccs_en[a]SM3/SM4 instructions enabled
6xcryptPadLock Advanced Cryptographic Engine (ACE, usingAES cipher) present:REP XCRYPT(ECB,CBC,CFB,OFB) instructions
7xcrypt_enACE enabled
8ace2ACE v2 present:REP XCRYPTCTR instruction, as well as support for digest mode and misaligned data for ACE'sREP XCRYPT* instructions.
9ace2_enACE v2 enabled
10phePadLock Hash Engine (PHE):REP XSHA1 andREP XSHA256 instructions
11phe_enPHE enabled
12pmmPadLockMontgomery Multiplier (PMM):REP MONTMUL instruction
13pmm_enPMM enabled
14(reserved)
15zx_fmaFMA supported
16parallaxAdaptiveP-state control present
17parallax_enAdaptive P-state control enabled
18overstressOverstress feature for auto overclock present
19overstress_enOverstress feature for auto overclock enabled
20tm3Thermal Monitor 3 present
21tm3_enThermal Monitor 3 enabled
22rng2RNG v2 - second generation RNG present:REP XRNG2 instruction
23rng2_enRNG v2 enabled
24semSME feature present
25phe2PHE v2: SHA384 and SHA512 present
26phe2_enPHE v2 enabled
27xmodxRSA instructions present:XMODEXP andMONTMUL2 instructions
28xmodx_enRSA instructions enabled
29vexVEX instructions present
30vex_enVEX instructions enabled
31stkSTK is present
  1. ^abcdOn VIANehemiah and Antaur CPUs (CentaurHauls Family 6 Model 9 only),[195] bits 0,1,4,5 are used differently:

CPUID usage from high-level languages

[edit]

Inline assembly

[edit]

This information is easy to access from other languages as well. For instance, the C code for gcc below prints the first five values, returned by the cpuid:

#include<stdio.h>#include<cpuid.h>intmain(){unsignedinti,eax,ebx,ecx,edx;for(i=0;i<5;i++){__cpuid(i,eax,ebx,ecx,edx);printf("InfoType %x\nEAX: %x\nEBX: %x\nECX: %x\nEDX: %x\n",i,eax,ebx,ecx,edx);}return0;}

In MSVC and Borland/Embarcadero C compilers (bcc32) flavored inline assembly, the clobbering information is implicit in the instructions:

#include<stdio.h>intmain(){unsignedinta,b,c,d,i=0;__asm{/* Do the call. */movEAX,i;cpuid;/* Save results. */mova,EAX;movb,EBX;movc,ECX;movd,EDX;}printf("InfoType %x\nEAX: %x\nEBX: %x\nECX: %x\nEDX: %x\n",i,a,b,c,d);return0;}

If either version was written in plain assembly language, the programmer must manually save the results of EAX, EBX, ECX, and EDX elsewhere if they want to keep using the values.

Wrapper functions

[edit]

GCC also provides a header called<cpuid.h> on systems that have CPUID. The__cpuid is a macro expanding to inline assembly. Typical usage would be:

#include<stdio.h>#include<cpuid.h>intmain(){unsignedinteax,ebx,ecx,edx;__cpuid(0/* vendor string */,eax,ebx,ecx,edx);printf("EAX: %x\nEBX: %x\nECX: %x\nEDX: %x\n",eax,ebx,ecx,edx);return0;}

But if one requested an extended feature not present on this CPU, they would not notice and might get random, unexpected results. Safer version is also provided in<cpuid.h>. It checks for extended features and does some more safety checks. The output values are not passed using reference-like macro parameters, but more conventional pointers.

#include<stdio.h>#include<cpuid.h>intmain(){unsignedinteax,ebx,ecx,edx;/* 0x81234567 is nonexistent, but assume it exists */if(!__get_cpuid(0x81234567,&eax,&ebx,&ecx,&edx)){printf("Warning: CPUID request 0x81234567 not valid!\n");return1;}printf("EAX: %x\nEBX: %x\nECX: %x\nEDX: %x\n",eax,ebx,ecx,edx);return0;}

Notice the ampersands in&a, &b, &c, &d and the conditional statement. If the__get_cpuid call receives a correct request, it will return a non-zero value, if it fails, zero.[196]

Microsoft Visual C compiler has builtin function__cpuid() so the cpuid instruction may be embedded without using inline assembly, which is handy since the x86-64 version of MSVC does not allow inline assembly at all. The same program forMSVC would be:

#include<stdio.h>#ifdef _MSC_VER#include<intrin.h>#endifintmain(){unsignedintregs[4];inti;for(i=0;i<4;i++){__cpuid(regs,i);printf("The code %d gives %d, %d, %d, %d",regs[0],regs[1],regs[2],regs[3]);}return0;}

Many interpreted or compiled scripting languages are capable of using CPUID via anFFI library.One such implementation shows usage of the Ruby FFI module to execute assembly language that includes the CPUID opcode.

.NET 5 and later versions provide theSystem.Runtime.Intrinsics.X86.X86base.CpuId method. For instance, the C# code below prints the processor brand if it supports CPUID instruction:

usingSystem.Runtime.InteropServices;usingSystem.Runtime.Intrinsics.X86;usingSystem.Text;namespaceX86CPUID{classCPUBrandString{publicstaticvoidMain(string[]args){if(!X86Base.IsSupported){Console.WriteLine("Your CPU does not support CPUID instruction.");}else{Span<int>raw=stackallocint[12];(raw[0],raw[1],raw[2],raw[3])=X86Base.CpuId(unchecked((int)0x80000002),0);(raw[4],raw[5],raw[6],raw[7])=X86Base.CpuId(unchecked((int)0x80000003),0);(raw[8],raw[9],raw[10],raw[11])=X86Base.CpuId(unchecked((int)0x80000004),0);Span<byte>bytes=MemoryMarshal.AsBytes(raw);stringbrand=Encoding.UTF8.GetString(bytes).Trim();Console.WriteLine(brand);}}}}

CPU-specific information outside x86

[edit]

Some of the non-x86 CPU architectures also provide certain forms of structured information about the processor's abilities, commonly as a set of special registers:

  • ARM architectures have aCPUID coprocessor register which requiresexception level EL1 or above to access.[197]
  • TheIBM System z mainframe processors have aStore CPU ID (STIDP) instruction since the 1983IBM 4381[198] for querying the processor ID.[199]
  • TheIBM System z mainframe processors also have aStore Facilities List Extended (STFLE) instruction which lists the installed hardware features.[199]
  • TheMIPS32/64 architecture defines a mandatoryProcessor Identification (PrId) and a series of daisy-chainedConfiguration Registers.[200]
  • ThePowerPC processor has the 32-bit read-onlyProcessor Version Register (PVR) identifying the processor model in use. The instruction requires supervisor access level.[201]

DSP andtransputer-like chip families have not taken up the instruction in any noticeable way, in spite of having (in relative terms) as many variations in design. Alternate ways of silicon identification might be present; for example, DSPs fromTexas Instruments contain a memory-based register set for each functional unit that starts with identifiers determining the unit type and model, itsASIC design revision and features selected at the design phase, and continues with unit-specific control and data registers. Access to these areas is performed by simply using the existing load and store instructions; thus, for such devices, there is no need for extending the register set for device identification purposes.[citation needed]

See also

[edit]

References

[edit]
  1. ^"Intel 64 and IA-32 Architectures Software Developer's Manual"(PDF). Intel.com. Retrieved2013-04-11.
  2. ^"Detecting Intel Processors - Knowing the generation of a system CPU". Rcollins.org. Retrieved2013-04-11.
  3. ^"LXR linux-old/arch/i386/kernel/head.S". Lxr.linux.no. Archived fromthe original on 2012-07-13. Retrieved2013-04-11.
  4. ^abcDebbie Wiles,CPU Identification, archived on 2006-06-04
  5. ^B-CoolWare,TMi0SDGL x86 CPU/FPU detection library with source code, v2.15, June 2000 - see /SOURCE/REALCODE.ASM for a large collection of pre-CPUID x86 CPU detection routines.Archived on 14 Mar 2023.
  6. ^"CPUID, EAX=4 - Strange results (Solved)". Software.intel.com. Retrieved2014-07-10.
  7. ^@InstLatX64 (February 28, 2019)."First encounter with "GenuineIotel" (o after I, instead of n)" (Tweet) – viaTwitter.
  8. ^"GenuineIotel CPUID dump for Intel Xeon E3-1231".instlatx64.
  9. ^instlatx64,CPUID dump for RDC IAD 100. Retrieved 22 December 2022.
  10. ^abcdsmxi,Inxi issue 197: Elbrus CPU support data and implementation. Retrieved 23 October 2023.Archived on 23 October 2023.
  11. ^Grzegorz Mazur,Identification of x86 CPUs with CPUID support, 5 May 1997. Archived from theoriginal on 24 May 1997.
  12. ^Ingo Böttcher,CPUDET.PAS v1.61, 23 Oct 1996 - CPU identification program that tests for "AMD ISBETTER" string.Archived on 26 Apr 2024.
  13. ^sorgelig (Aug 3, 2017)."ao486 CPUID instruction (in commit 43a2004)".GitHub.Archived from the original on 2023-12-04. Retrieved2023-12-04.
  14. ^absorgelig (Aug 30, 2020)."Update cpuid. · MiSTer-devel/ao486_MiSTer@82f5014".GitHub.Archived from the original on 2023-12-04. Retrieved2023-12-04.
  15. ^sorgelig (Aug 30, 2020)."ao486 CPUID instruction".GitHub.Archived from the original on October 23, 2023. Retrieved4 Dec 2023.
  16. ^"v586: 586 compatible soft core for FPGA".GitHub. 6 December 2021.
  17. ^"Steam Hardware & Software Survey".store.steampowered.com. Retrieved2022-07-26.
  18. ^"Fun with Timers and cpuid - by Jim Cownie - CPU fun". 3 March 2021.
  19. ^virt-what source tree,tests/lx86/proc/cpuinfo - PowerVM Lx86 cpuinfo dump.Archived on 10 Nov 2024.
  20. ^Neko Project 21/W,help/configure (in Japanese).Archived on 22 Sep 2024.
  21. ^CPU-World,CPUID for emulated Neko Project CPU with "Neko Project" string.Archived on 21 Dec 2024.
  22. ^iXBT Labs,VIA Nano CPUID Tricks, Aug 26, 2010.Archived on Aug 29, 2010.
  23. ^IDT,WinChip 2A data sheet, v1.0, Jan 1999, page A-3.
  24. ^VIA,C3 Nehemiah Datasheet, rev 1.13, Sep 29, 2004, page A-3.
  25. ^Agner Fog,CpuIDFake, v1.00, Jan 22, 2010, see "Instructions.txt".Archived on Jul 9, 2010.
  26. ^abTransmeta,Crusoe BIOS Programmer's Guide, Jan 23, 2004, pages 63-65.
  27. ^Transmeta, Efficeon BIOS Programmers Guide, Aug 19, 2003, section 8.3, page 148.
  28. ^AMD,Geode LX Data Book, pub.id. 33234H, Feb. 2009, page 107.Archived on Dec 3, 2023.
  29. ^DM&P,Vortex86EX2_A9133_Master_Data_Sheet_V11_BF, May 8, 2019, page 72.
  30. ^"Chapter 3 Instruction Set Reference, A-L"(PDF).Intel 64 and IA-32 Architectures Software Developer's Manual. Intel Corporation. 2018-12-20. Retrieved2018-12-20.
  31. ^Intel,Pentium Processor Family Developer's Manual, 1997, order no. 241428-005, sections 3.4.1.2 (page 91), 17.5.1 (page 489) and appendix A (page 522) provide more detail on how the "processor type" field and the "dual processor" designation work.
  32. ^InstLatx64,x86, x64 Instruction Latency, Memory Latency and CPUID dumps, 30 Sep 2023.
  33. ^AMD,Enhanced Am486DX Microprocessor Family, pub.no. 20736 rev B, March 1997, section 9.2.2, page 55.Archived on 18 Oct 2023.
  34. ^AMD,ÉlanSC400 and ÉlanSC410 Microcontrollers User's Manual, pub.no. 21030, 1997, section 3.6.2, page 73.Archived on 18 Oct 2023.
  35. ^Cyrix,5x86 BIOS Writers Guide, rev 1.12, order no. 92426-00, 1995, page 7
  36. ^abCyrix,CPU Detection Guide, rev 1.01, 2 Oct 1997, page 6.
  37. ^MiSTer ao486 source code,rtl/ao486/defines.v, line 70.Archived on 23 Oct 2023.
  38. ^CPU-World,CPUID for Vortex86DX2 933 MHz.Archived on 17 Oct 2023.
  39. ^CPU-World,CPUID for Vortex86EX2.Archived on 18 Oct 2023.
  40. ^InstLatx64,Centaur CNS CPUID dump.Archived on 30 May 2023.
  41. ^Jeff Atwood,Nasty Software Hacks and Intel's CPUID.Coding Horror, 16 Aug 2005.
  42. ^abIntel,Intel Xeon Phi Coprocessor Instruction Set Architecture Reference Manual, sep 2012, order no. 327364-001, appendix B.8, pages 673-674.Archived on 4 Aug 2021.
  43. ^CPU-World,CPUID for Intel Itanium 2 1.50 GHz.Archived on 17 Oct 2023.
  44. ^"[PATCH] x86/cpu: Add two Intel CPU model numbers - Tony Luck".lore.kernel.org. Retrieved2024-09-24.
  45. ^InstLatX64,72-Core Intel Xeon Phi 7290 CPUID dump
  46. ^InstLatx64,96-Core AMD Ryzen Threadripper Pro 7995WX CPUID dump
  47. ^Intel Processor Identification and the CPUID Instruction(PDF), Intel, May 2002, archived fromthe original(PDF) on 2021-04-17
  48. ^Linux 6.3 kernel sources,/arch/x86/include/asm/cpuid.h, line 69
  49. ^gcc-patches mailing list,CPUID Patch for IDT Winchip, May 21, 2019
  50. ^Geoff Chappell,CMPXCHG8B Support in the 32-Bit Windows Kernel, Jan 23, 2008.Archived on Jan 30, 2023.
  51. ^AMD,AMD Processor Recognition Application Note, publication #20734, rev D, Jan 1997, page 13
  52. ^Intel,AP-485 Application Note - Intel Processor Identification and the CPUID Instruction, order no. 241618-006, march 1997, table 5 on page 10, see bit 10.
  53. ^Michal Necasek,SYSENTER, Where Are You?,OS/2 Museum, July 20, 2017
  54. ^Intel,TDX module source code, v1.0.03.03, 22 Jun 2023, see src/common/helpers/smrrs.h.Archived on 20 Jan 2025.
  55. ^Intel,Trust Domain CPU Architectural Extensions, order no. 343754-002, may 2021.Archived on 17 Dec 2024.
  56. ^Intel,Pentium 4 Processor on 90 nm Process Specification Update, order no. 302352-031, sep 2006, see erratum R85 on page 59.Archived on 31 Dec 2008.
  57. ^Geoff Chappell,ECX From CPUID Leaf 1, Jan 26, 2020.Archived on May 9, 2020.
  58. ^Huggahalli, Ram; Iyer, Ravi; Tetrick, Scott (2005). "Direct Cache Access for High Bandwidth Network I/O".ACM SIGARCH Computer Architecture News.33 (2):50–59.CiteSeerX 10.1.1.85.3862.doi:10.1145/1080695.1069976.CiteSeerX:10.1.1.91.957.
  59. ^Drepper, Ulrich (2007),What Every Programmer Should Know About Memory,CiteSeerX:10.1.1.91.957
  60. ^abIntel,Itanium Architecture Software Developer's Manual, rev 2.3, volume 4: IA-32 Instruction Set, may 2010, document number: 323208, table 2-5, page 4:81, see bits 20 and 30.Archived on Feb 15, 2012.
  61. ^Intel,AP-485, Processor Identification and the CPUID Instruction flag, rev 30, jan 2006, page 26
  62. ^Michal Necasek,HTT Means Hyper-Threading, Right?,OS/2 Museum, dec 11, 2017
  63. ^"Mechanisms to determine if software is running in a VMware virtual machine".VMware Knowledge Base.VMWare. 2015-05-01.Intel and AMD CPUs have reserved bit 31 of ECX of CPUID leaf 0x1 as the hypervisor present bit. This bit allows hypervisors to indicate their presence to the guest operating system. Hypervisors set this bit and physical CPUs (all existing and future CPUs) set this bit to zero. Guest operating systems can test bit 31 to detect if they are running inside a virtual machine.
  64. ^Kataria, Alok; Hecht, Dan (2008-10-01)."Hypervisor CPUID Interface Proposal".LKML Archive on lore.kernel.org.Archived from the original on 2019-03-15.Bit 31 of ECX of CPUID leaf 0x1. This bit has been reserved by Intel & AMD for use by hypervisors and indicates the presence of a hypervisor. Virtual CPU's (hypervisors) set this bit to 1 and physical CPU's (all existing and future CPU's) set this bit to zero. This bit can be probed by the guest software to detect whether they are running inside a virtual machine.
  65. ^"AMD64 Technology AMD64 Architecture Programmer's Manual Volume 2: System Programming"(PDF) (3.41 ed.). Advanced Micro Devices, Inc. p. 498. 24593. Archived fromthe original(PDF) on 30 Sep 2023. Retrieved9 September 2023.15.2.2 Guest Mode This new processor mode is entered through the VMRUN instruction. When in guest mode, the behavior of some x86 instructions changes to facilitate virtualization. The CPUID function numbers 4000_0000h-4000_00FFh have been reserved for software use. Hypervisors can use these function numbers to provide an interface to pass information from the hypervisor to the guest. This is similar to extracting information about a physical CPU by using CPUID. Hypervisors use the CPUID Fn 400000[FF:00] bit to denote a virtual platform. Feature bit CPUID Fn0000_0001_ECX[31] has been reserved for use by hypervisors to indicate the presence of a hypervisor. Hypervisors set this bit to 1 and physical CPU's set this bit to zero. This bit can be probed by the guest software to detect whether they are running inside a virtual machine.
  66. ^IntelSDM vol 2A, order no. 253666-053, Jan 2015, p. 244
  67. ^abIntel,Processor Identification and the CPUID Instruction Application Note 485, order no. 241618-037, Jan 2011, pages 31-32.Archived on 17 Oct 2023.
  68. ^Intel,Itanium Processor Reference Manual for Software Development, rev 2.0, order no. 245320-003, December 2001, page 110. Archived fromthe original on 18 Feb 2004.
  69. ^abIntel,Processor Identification and the CPUID Instruction Application Note 485, order no. 241618-036, Aug 2009, page 26.Archived on 6 Oct 2023.
  70. ^InstLatX64,Willamette-128 CPUID dump.Archived on 7 Dec 2019.
  71. ^InstLatX64,Northwood-128 CPUID dump.Archived on 7 Dec 2019.
  72. ^InstLatX64,Prescott-256 CPUID dump.Archived on 6 Dec 2019.
  73. ^InstLatX64,Intel Tolapai CPUID dump.Archived on 19 Jan 2019.
  74. ^Jason Gaston,(PATCH 2.6.24-rc5) x86 intel_cacheinfo.c: cpu cache info entry for Intel Tolapai,LKML, 20 Dec 2007.Archived on 9 Nov 2024.
  75. ^VIA-Cyrix,Application Note 120: Cyrix III CPU BIOS Writer's Guide, rev 1.1, 24 Nov 1999, page 13. Archived from theoriginal on 29 Sep 2000.
  76. ^InstlatX64,Intel Atom 230 CPUID dump.Archived on 7 Dec 2019.
  77. ^WikiChip,Bonnell.Archived on 16 Jul 2017.
  78. ^Cyrix,Cyrix CPU Detection Guide, rev 1.01, 2 Oct 1997, page 13.
  79. ^CPU-World forum,Working Timna desktop 2023, page 2 - lists a CPUID dump from a Timna engineering sample.Archived on 9 Nov 2024.
  80. ^Geoff Chappell,CPUID Leaf 2, 26 Jan 2020.Archived on Sep 4, 2023.
  81. ^Intel,Itanium 2 Processor Reference Manual, order no. 251110-003, May 2004, page 192. Archived fromthe original on 7 Dec 2006.
  82. ^Intel,Itanium 2 Processor Specification Update, order.no. 251141-028, Nov 2004, erratum 6 on page 26. Archived fromthe original on 25 Nov 2004.
  83. ^Intel,Atom C3000 Processor Product Family Specification Update, order no. 336345-020, page 16, Mar 2023.Archived on 7 Oct 2023.
  84. ^Intel,6th Generation Intel Processor Specification Update, order no. 332689-030, July 2023, see erratum SKL148 on page 66. Archived from theoriginal on 8 mar 2023.
  85. ^Intel,10th Generation Intel Core Processor Specification Update, order no. 615213-013, apr 2023, see erratum CML081 on page 41.Archived on 19 Jul 2024.
  86. ^Intel,Xeon Processor 7500 Series Datasheet, order no. 323341-001, March 2010, page 150.Archived on Oct 8, 2023.
  87. ^Intel,Optimization Reference Manual, volume 1, order no. 248966-049, jan 2024, chapter 9.6.3.3, p. 361.Archived on 19 Apr 2024.
  88. ^Intel,Processor Identification and the CPUID Instruction, order no. 241618-031, sep 2006, page 32.
  89. ^abShih Kuo (Jan 27, 2012)."Intel 64 Architecture Processor Topology Enumeration".
  90. ^"Processor and Core Enumeration Using CPUID | AMD". Developer.amd.com. Archived fromthe original on 2014-07-14. Retrieved2014-07-10.
  91. ^"Sandybridge processors report incorrect core number?". Software.intel.com. 2012-12-29. Retrieved2014-07-10.
  92. ^"cpuid, __cpuidex". Msdn.microsoft.com. 2014-06-20. Retrieved2014-07-10.
  93. ^"x86 architecture - CPUID". sandpile.org. Retrieved2014-07-10.
  94. ^"topology.cpp in ps/trunk/source/lib/sysdep/arch/x86_x64 – Wildfire Games". Trac.wildfiregames.com. 2011-12-27. Archived fromthe original on 2021-03-09. Retrieved2014-07-10.
  95. ^Hyper-Threading Technology and Multi-Core Processor Detection
  96. ^Intel,Architecture Instruction Set Extensions Programming Reference, order no. 319433-052, March 2024, chapter 17.Archived on Apr 7, 2024.
  97. ^Intel,Intel Processor Identification and the CPUID Instruction (AP-485, rev 30), order no. 241618-030, Jan 2006, page 19.
  98. ^Intel,Intel 64 and IA-32 Architecture Software Developer's Manual, order no. 352462-079, volume 3B, section 15.4.4.4, page 3503
  99. ^Intel,Processor Identification and the CPUID Instruction, order no. 241618-038, apr 2012, p.38
  100. ^Intel,Product Change Notification 108701, 1 aug 2008. Archived on May 11, 2023
  101. ^ab"Performance Monitoring Impact of Intel Transactional Synchronization Extension Memory Ordering Issue"(PDF).Intel. June 2023. p. 8. Retrieved8 May 2024.
  102. ^abcIntel,Architecture Specification: Intel Trust Domain Extensions (Intel TDX) Module, order no. 344425-001, sep 2020, pages 120-122. Archived from theoriginal on Jul 29, 2021.
  103. ^Intel,Deprecating the PCOMMIT instruction, sep 12, 2016.Archived on Apr 23, 2023.
  104. ^Intel,AVX512-FP16 Architecture Specification (PDF), document number 347407-001, June 2021.Archived on Oct 26, 2022
  105. ^abcd"Speculative Execution Side Channel Mitigations"(PDF). Revision 2.0.Intel. May 2018 [January 2018]. Document Number: 336996-002. Retrieved2018-05-26.
  106. ^"IBRS patch series [LWN.net]".
  107. ^Intel,X86S External Architecture Specification v1.2, June 2024, order no. 351407-002, section 3.5, page 13. Archived from theoriginal on 2 Oct 2024.
  108. ^Intel,Envisioning a Simplified Intel Architecture - as of 20 Dec 2024, contains a mention that Intel has chosen not to pursue X86S.Archived on 20 Dec 2024.
  109. ^abcIntel,Flexible Return and Event Delivery (FRED) Specification, rev 6.1, December 2023, order no. 346446-007, page 14.Archived on Dec 22, 2023.
  110. ^Intel,Software Developer's Manual, order no. 325462-080, June 2023 - information about prematurely busy shadow stacks provided in Volume 1, section 17.2.3 on page 410; Volume 2A, table 3.8 (CPUID EAX=7,ECX=2) on page 820; Volume 3C, table 25-14 on page 3958 and section 26.4.3 on page 3984.
  111. ^LKML,Re: (PATCH v3 00/21) Enable CET Virtualization, Jun 16, 2023 - provides additional discussion of how the CET-SSS prematurely-busy stack issue interacts with virtualization.
  112. ^abIntel,Advanced Vector Extensions 10, rev 1.0, July 2023, order no. 355989-001.Archived on Jul 24, 2023.
  113. ^abIntel,Advanced Performance Extensions - Architecture Specification, rev 2.0, Aug 2023, order no. 355828-002, page 37.Archived on Sep 10, 2023.
  114. ^Intel,Fast Store Forwarding Predictor, 8 Feb 2022.Archived on 6 Apr 2024.
  115. ^abcIntel,Branch History Injection and Intra-mode Branch Target Injection / CVE-2022-0001, CVE-2022-0002 / INTEL-SA-00598, 4 Aug 2022.Archived on 5 May 2023.
  116. ^Intel,Return Stack Buffer Underflow / CVE-2022-29901, CVE-2022-28693 / INTEL-SA-00702, 12 Jul 2022.Archived on 13 Jul 2022.
  117. ^Intel,Data Dependent Prefetcher, 10 Nov 2022.Archived on 4 Aug 2024.
  118. ^Intel,MONITOR and UMONITOR Performance Guidance, 10 Jul 2024.Archived on 27 Nov 2024.
  119. ^Intel,Asynchronous Enclave Exit Notify and the EDECCSSA User Leaf Function, 30 Jun 2022.Archived on 21 Nov 2022.
  120. ^Linux kernel git commit 604dc91,x86/tsc: Use CPUID.0x16 to calculate missing crystal frequency, 9 May 2019 - contains notes on computing the Core Crystal Clock frequency on CPUs that don't specify it, and corresponding C code.
  121. ^Intel,SDM Volume 3A, order no 253668-083, March 2024, chapter 11.5.4, page 408
  122. ^instlatx64,Spreadtrum SC9853I-IA CPUID dump
  123. ^Intel,Architecture Specification: Intel Trust Domain Extensions (Intel TDX) Module, order no. 344425-005, page 93, Feb 2023.Archived on 20 Jul 2023.
  124. ^abIntel,Intel Xeon Phi Coprocessor Instruction Set Architecture Reference Manual, Sep 2012, order no. 327364-001, appendix B.8, pages 677.Archived on 4 Aug 2021.
  125. ^abMicrosoft,Hyper-V Feature and Interface Discovery, 8 Jul 2022.Archived on 18 Nov 2023.
  126. ^Geoff Chappell,HV_HYPERVISOR_INTERFACE, 10 Dec 2022.Archived on 1 Feb 2023.
  127. ^QEMU documentation,Hyper-V Enlightenments.Archived on 17 Apr 2024.
  128. ^Linux 6.8.7 kernel source,/source/arch/x86/kvm/cpuid.c, lines 1482-1488
  129. ^Linux kernel documentation,KVM CPUID bits.Archived on 22 Aug 2022.
  130. ^Linux 6.8.7 kernel source,/arch/x86/kvm/hyperv.c, line 2793
  131. ^Linux kernel documentation,Virtualization support: 4.118 KVM_GET_SUPPORTED_HV_CPUID.Archived on 26 Mar 2024.
  132. ^FreeBSDcommit 560d5ed, 28 Jun 2013, see file /sys/amd64/vmm/x86.c, line 48.Archived on 22 Apr 2024.
  133. ^HyperKit source code,/src/lib/vmm/x86.c line 42, 8 May 2021.
  134. ^Xen,CPUID Interface to Xen.Archived on 22 Apr 2024.
  135. ^QEMU source code,fb/target/i386/cpu.c, line 6475, 18 Mar 2024.
  136. ^VMWare,Mechanisms to determine if software is running in a VMware virtual machine, 1 May 2015.Archived on 18 Jun 2023.
  137. ^Project ACRN,CPUID Virtualization, 20 Oct 2022.Archived on 25 Mar 2023.
  138. ^VirtualBox documentation,9.30 Paravirtualized Debugging.Archived on 22 Apr 2024.
  139. ^QNX,Hypervisor - Checking the guest's environment, 25 Mar 2022.Archived on 22 Apr 2024.
  140. ^NetBSD source code,/sys/dev/nvmm/x86/nvmm_x86_vmx.c, line 1430, 6 Nov 2023.
  141. ^OpenBSD source code,/sys/arch/amd64/include/vmmvar.h, line 24, 9 Apr 2024.
  142. ^Siemens Jailhouse hypervisor documentation,hypervisor-interfaces.txt, line 39, 27 Jan 2020.Archived on Jul 5, 2024.
  143. ^Intel HAXM source code,/core/cpuid.c, line 979, 20 Jan 2023.Archived on 22 Apr 2024.
  144. ^Intel KGT source code (trusty branch),/vmm/vmexit/vmexit_cpuid.c, lines 17-75, 15 May 2019
  145. ^Linux kernel v5.18.19 source code,/source/drivers/visorbus/visorchipset.c, line 28
  146. ^N. Moore,virt: Support detection of LMHS SRE guests #25594, 1 Dec 2022 - Lockheed Martin-provided pull-request for systemd, adding CPUID hypervisor ID string for the LMHS SRE hypervisor.Archived on 23 Apr 2024.
  147. ^CPUID Specification, publication no.25481, rev 2.34(PDF),AMD, September 2010, archived fromthe original(PDF) on 18 Aug 2022
  148. ^Linux kernel source code
  149. ^AMD,AMD-K6 Processor Data Sheet, order no. 20695H/0, march 1998, section 24.2, page 283
  150. ^AMD,AMD-K6 Processor Revision Guide, order no. 21846H/0, June 1999, section 3.2.1, page 17
  151. ^Intel,Intel 64 and IA-32 Architectures Software Developer's Manual, order no. 325462-079, march 2023, table 3-8 on page 3-238
  152. ^Lightweight Profiling Specification(PDF),AMD, August 2010, archived fromthe original(PDF) on 2012-11-27, retrieved2013-04-03
  153. ^Cyrix,Cyrix CPU Detection Guide, rev 1.01, oct 2, 1997, page 12
  154. ^AMD,Geode GX1 Processor Data Book, rev 5.0, december 2003, pages 202 and 226.Archived on 20 Apr 2020.
  155. ^Transmeta,Processor Recognition, 2002-05-07, page 5
  156. ^abAMD,Processor Recognition Application Note, pub.no. 20734, rev. 3.13, december 2005. Section 2.2.2 (p.20) and Section 3 (pages 33 to 40) provide details on howCPUID.(EAX=8000_0001):EDX[bit 19] should be used to identify processors. Section 3 also provides information on AMD's brand name string MSRs. Archived from theoriginal on Jun 26, 2006.
  157. ^AMD,Family 10h BKDG, document no. 31116, rev 3.62, jan 11, 2013, p. 388 - lists the NodeId bit.Archived on 16 Jan 2019.
  158. ^AMD,AMD64 Architecture Programmer's Manual Volume 3, pub. no. 24594, rev 3.20, may 2013, page 579 - lists the StreamPerfMon bit
  159. ^"Intel Processor Identification and the CPUID Instruction"(PDF). Download.intel.com. 2012-03-06. Retrieved2013-04-11.
  160. ^InstLatx64,Vortex86DX3 CPUID dump, 27 Sep 2021.Archived on 21 Oct 2021.
  161. ^InstLatx64,AMD Ryzen 7 6800HS CPUID dump, 21 Feb 2022.Archived on 24 Mar 2023.
  162. ^Chips and Cheese,Why you can't trust CPUID, 27 Oct 2022.Archived on 3 Nov 2022.
  163. ^AMD,Geode LX Databook, pub.id. 33234H, Feb 2009, page 207.
  164. ^InstLatx64,2x 24-core Montage Jintide C2460 CPUID dump
  165. ^InstLatx64,2x 24-core Intel Xeon Platinum 8160 CPUID dump
  166. ^InstLatx64,Zhaoxin KaiXian ZX-C+ C4580 CPUID dump
  167. ^InstLatx64,VIA Eden X4 C4250 CPUID dump
  168. ^Cyrix,Application Note 112: Cyrix CPU Detection Guide, page 17, 21 July 1998.
  169. ^Instlatx64,VIA Cyrix III "Samuel" CPUID dump
  170. ^AMD,BKDG for AMD Family 10h Processors, pub.no. 31116, rev 3.62, jan 11, 2013, page 392.Archived on 16 Jan 2019.
  171. ^abcdAMD,PPR For AMD Family 19h Model 61h rev B1 procesors, pub.no. 56713, rev 3.05, Mar 8, 2023, pages 99-100.Archived on 25 Apr 2023.
  172. ^AMD,BKDG for AMD Family 16h Models 00-0Fh processors, pub.no. 48571, rev 3.03, Feb 19, 2015, page 482.Archived on 16 Jan 2019.
  173. ^AMD,BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD Opteron Processors, publication #26094, rev 3.30, feb 2006, pages 29-30 (lists Athlon 64 revision differences, including LMSLE) (archived on 16 Jan 2019), andRevision Guide for AMD Athlon 64 and AMD Opteron Processors, publication #25759, rev 3.79, july 2009, pages 7-8 (lists Athlon 64 revision IDs) (archived on 18 Jan 2019).
  174. ^AMD,PPR for AMD Family 19h Model 01h, Revision B1 Processors, Volume 1 of 2, document no. 55898, rev 0.50, may 27, 2021, page 98 - lists branch-sampling bit.Archived on Jul 24, 2022
  175. ^AMD,AMD64 Virtualization Codenamed "Pacifica" Technology, publication no. 33047, rev 3.01, May 2005, appendix B, page 81. Archived on Jun 13, 2011.
  176. ^AMD,CPUID specification, publication #25481, revision 2.18, jan 2006, page 18.
  177. ^AMD,CPUID specification, publication #25481, revision 2.34, sep 2010, pages 5 and 11.
  178. ^Instlatx64,AMD E-350 CPUID dump - has CPUID.(EAX=8000000A):EDX[9] set.
  179. ^AMD,CPUID specification, publication #25481, revision 2.28, apr 2008, page 21.
  180. ^AMD,CPUID specification, publication #25481, revision 2.34, sep 2010, page 5 - lists "SseIsa10Compat" as having been dropped in November 2009.
  181. ^abAMD,PPR for AMD Family 19h Model 61h, Revision B1 processors, document no. 56713, rev 3.05, mar 8 2023, page 102.Archived on Apr 25, 2023.
  182. ^abcAMD,Processor Programming Reference (PPR) for AMD Family 1Ah Model 24h, Revision B0 Processors, order no. 57254, rev 3.00, Sep 26, 2024, pages 102, 118, 119 and 199.
  183. ^AMD,Secure VM Service Module for SEV-SNP Guests, pub.no #58019, rev 1.00, Jul 2023, page 13.Archived on 5 Aug 2023.
  184. ^abAMD,PPR for AMD Family 19h Model 61h, Revision B1 processors, document no. 56713, rev 3.05, mar 8 2023, page 116.Archived on Apr 25, 2023.
  185. ^AMD,5th Gen AMD EPYC Processor Architecture, First Edition, October 2024, page 9.
  186. ^abcdeAMD,Technical Update Regarding Speculative Return Stack Overflow, rev 2.0, feb 2024.Archived on Apr 12, 2024.
  187. ^Ferrie, Peter."Attacks on Virtual Machine Emulators"(PDF).Symantec. Symantec Advanced Threat Research. Archived fromthe original(PDF) on 2007-02-07. Retrieved15 March 2017.
  188. ^Sandpile,x86 architecture CPUID. Retrieved 22 December 2022.
  189. ^instlatx64,CPUID dump of AMD A4-5000, lists "HELLO KITTY" string for CPUID leaf8FFFFFFFh. Retrieved 22 December 2022.
  190. ^IDT,WinChip 2B Processor Data Sheet, v0.9, April 1999, chapter 3.3.3, page 31.
  191. ^VIA,PadLock Programming Guide rev. 1.66, aug 4, 2005, page 5. Archived from theoriginal on May 26, 2010
  192. ^OpenEuler 1.0 LTS kernel sources,/arch/x86/include/asm/cpufeatures.h lines 147-178.Archived on Jul 30, 2023.
  193. ^Zhaoxin,Padlock instruction set reference, 26 Dec 2024. Archived from theoriginal on 15 Mar 2025.
  194. ^Zhaoxin,GMI reference, 26 Dec 2024. Archived from theoriginal on 15 Mar 2025.
  195. ^VIA,C3 Nehemiah Processor Datasheet, rev 1.13, Sep 29, 2004, page 21
  196. ^"GCC-mirror/GCC".GitHub. 13 March 2022.
  197. ^"ARM Information Center". Infocenter.arm.com. Retrieved2013-04-11.
  198. ^"Processor version codes and SRM constants". Archived fromthe original on 2014-09-08. Retrieved2014-09-08.
  199. ^ab"IBM System z10 Enterprise Class Technical Guide"(PDF).
  200. ^"MIPS32 Architecture For Programmers, Volume III: The MIPS32 Privileged Resource Architecture"(PDF). MIPS Technologies, Inc. 2001-03-12.
  201. ^"PowerPC Operating Environment Architecture, book III"(PDF).
  202. ^S. Darwish, Ahmed."[ANNOUNCE] x86-cpuid.org: A machine-readable CPUID repository".Linux Kernel Mailing List archive. Retrieved20 July 2024.

Further reading

[edit]

External links

[edit]
SIMD (RISC)
SIMD (x86)
Bit manipulation
  • BMI (ABM: 2007, BMI1: 2012, BMI2: 2013, TBM: 2012)
  • ADX (2014)
Compressed instructions
Security andcryptography
Transactional memory
Virtualization
Suspended extensions' dates arestruck through.
Retrieved from "https://en.wikipedia.org/w/index.php?title=CPUID&oldid=1280620286"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp