Skip to content

features: Fill out CPUID leaves and VMX MSRs, normalize names - #31

Open
joshjob-scale wants to merge 1 commit into
ScaleComputing:mainfrom
joshjob-scale:features
Open

joshjob-scale wants to merge 1 commit into
ScaleComputing:mainfrom
joshjob-scale:features

Conversation

@joshjob-scale

Copy link
Copy Markdown
Collaborator

No description provided.

@joshjob-scale joshjob-scale self-assigned this Oct 16, 2026
Add every bit the Intel SDM (325462-093, Vol. 1 ch. 21) and AMD APM
(24594 rev 3.38, Vol. 3 appendix E) define for:
 - leaf 1 ECX/EDX, plus the EBX fields and processor type
 - leaf 7 sub-leaves 0, 1 and 2
 - 0x80000001 (new) and 0x80000007 (new)
 - 0x80000008 address sizes, EBX feature bits, ECX/EDX fields
 - new leaves 0x6 (thermal/power), 0x12 (SGX, sub-leaf 0), 0x14 (PT),
   0x1E (TMUL), 0x24 (AVX10), 0x8000000A (SVM), 0x80000021, 0x80000022
Where both vendors define a bit they agree on its meaning; AMD-only bits
are included. The exception is VERW_CLEAR: APM 3.38 lists it at
0x80000021 ECX[5] while QEMU and Linux use EAX[5], so both are defined.

Add the VMX capability MSRs from SDM Vol. 3D appendix A: exit controls
(0x483, 0x48f, 0x493), entry controls (0x484, 0x490), misc (0x485),
EPT/VPID caps (0x48c) and VM functions (0x491). Fill in the remaining
IA32_ARCH_CAPABILITIES, IA32_MCU_OPT_CTRL and IA32_VMX_BASIC fields.

Fix two existing definitions: vme is EDX bit 1 (was 0) and AVX-VNNI is
leaf 7.1 EAX bit 4 (was 14).

Normalize CPUID leaf and field names and MSR field names to dashed
lowercase. Fields use QEMU's -cpu option name for the same bit when QEMU
has one (target/i386/cpu.c feature_word_info), otherwise the manual's
name. QEMU names for default1 VMX controls (vmx-cr3-*-noexit,
vmx-exit-nosave-debugctl, vmx-entry-noload-debugctl) describe the
allowed-0 sense, so the manual's names are used for those bits. This
changes fact paths, so fact files saved before this commit will not diff
cleanly against new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants