Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[General]: LIMIT_CPUID_MAXVAL does not limit the leaf-zero result

Closed Beginner friendly
#66 1 comment 0 reactions 0 assignees View on GitHub

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

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

Executable specification issue

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.

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/SDM

All issues in intel/SDM

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.