[General]: LIMIT_CPUID_MAXVAL does not limit the leaf-zero result
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- xml
- Domain
- backend-api-design
Research direction
Start with data/instruction/CPUID.xml, the file named in the issue, and inspect how CPUID handles input leaf 0 and IA32_MISC_ENABLE.LIMIT_CPUID_MAXVAL. Compare the existing behavior with the stated Intel SDM references and check that other leaves remain unaffected. Done means EAX is capped at 2 for leaf 0 when the limit is enabled, while values at or below 2 and other leaves retain their behavior.
Written by the indexing model from the issue text.
Description
Problem
The CPUID operation redirects basic input leaves above 2 when LIMIT_CPUID_MAXVAL is set, but leaves the EAX result of input leaf 0 unchanged. A binding that reports the processor's unrestricted maximum therefore exposes that maximum even while the limit bit is active.
Concrete case
Use a processor profile where the legacy limit feature is supported, CPUIDMAXVAL_LIM_RMV=0, and the unrestricted basic maximum is greater than 2. Let Get_CPUID_Value(0,0) return that maximum in EAX. Set IA32_MISC_ENABLE[22]=1 and execute CPUID with EAX=0. The source returns the unrestricted value; the legacy-limit contract requires the limited maximum.
Expected behavior and references
References use Intel SDM 325462-093, checked on 2026-10-01. PDF page numbers below refer to the combined manual.
- Vol. 1 §21.1.3, legacy CPUID limits and removal enumeration; combined PDF page 442
- Vol. 4 Table 2-2, IA32_MISC_ENABLE bit 22; combined PDF page 4761
Source
Source checked at Intel SDM repository commit b5218b0f1cf512304d4b3cb364433a08fcee47cb.
Suggested correction
When IA32_MISC_ENABLE.LIMIT_CPUID_MAXVAL is set and the input leaf is zero, cap the returned EAX value at 2 before writing it to RAX. Keep the existing handling of other leaves.
Evidence
Source inspection shows that CPUID writes the unrestricted leaf-zero result without applying IA32_MISC_ENABLE[22]. In model execution on a profile supporting the legacy limit, the corrected operation returns 2 for a supplied leaf-zero maximum above 2 when the limit is enabled. The added condition leaves results already at or below the cap unchanged.
AI disclosure
Assisted by Codex
- Dominant language
- HTML
- Stars
- 40
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/SDM
-
Executable specification issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Executable specification issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Executable specification issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
SDM PDF issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
SDM PDF issue SDM Volume 1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
influxdata/openapi#660 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Albert-Weasker/niubigeo#168 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenPrinting/cups#1751 ·
Maintainers usually reply within 1 day