Extensions
Forms
3 (1 Legacy, 1 VEX, 1 EVEX)
Data
Intel XED v2026.08.23

RDMSR reads the model-specific register whose number is in ECX into EDX:EAX, the high half in EDX. In 64-bit mode bits 63:32 of RCX are ignored and those of RAX and RDX cleared, so a 64-bit value takes a shift and an OR to assemble, as with RDTSC. MSRs hold the processor’s configuration and its counters: EFER (C0000080H) with the long-mode and SYSCALL enables, the SYSCALL targets, the FS and GS bases, the time stamp counter (10H) and many more. Both vendors share some numbers and differ on many: Intel’s MSRs are listed in its manual’s Volume 4, AMD’s in its Volume 2 and in the documentation of each processor family.

Privileged, and strict about numbers

RDMSR runs only at CPL 0 (or in real mode); elsewhere it raises #GP(0). Zen 5 recorded that at CPL 3 for EFER and for the time stamp counter, with RAX and RDX left alone. At CPL 0 a number the processor does not implement raises #GP(0) too, rather than reading 0, so code that reads an MSR it is not sure of has to be ready for the fault. Bits that an MSR does not implement read as undefined, both manuals say.

Order

RDMSR is not serializing. Intel’s manual warns that a sequence of RDMSRs may read their MSRs in another order than the program’s, and offers IA32_BARRIER (2FH) to order the reads of RDMSRLIST, which reads up to 64 MSRs from a table in one instruction.

Other forms and kin

  • With MSR_IMM, a VEX form (and an APX one) takes the number as a 32-bit immediate and writes all 64 bits to one register; Intel’s manual says it may be faster. No processor at hand has it.
  • URDMSR reads, at any CPL, the MSRs that the OS marks in a bitmap given by IA32_USER_MSR_CTL.
  • RDPMC and RDTSC read counters that are also MSRs, without needing CPL 0 where the OS allows.

Under a hypervisor, RDMSR may leave the guest: Intel’s VMX checks an MSR bitmap and AMD’s SVM an MSR permissions map, both set by the hypervisor, to decide which reads exit. WRMSR is the write. AMD’s Zen 5 guide lists RDMSR as microcoded.

Vulnerability mitigations

Mitigations of these processor vulnerabilities use RDMSR:

Forms

Every encoding of RDMSR that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
RDMSR RDMSR0F 32Base instruction set
RDMSR r64, imm32 64-bit mode only RDMSR_GPR64u64_IMM32VEX.LZ.F2.MAP7.WIG F6 /0 idMSR_IMM
RDMSR r64, imm32 RDMSR_GPR64u64_IMM32_APXEVEX.LLZ.F2.MAP7.WIG F6 /0 idAPX_F + MSR_IMM

Latency and throughput

What the scheduling models of LLVM 23.1.2 give for each form, not measurements: latency / reciprocal throughput in cycles, the ports under them. A row is a model, or models that agree; a dash, a form that its processors lack. Memory forms: latency from the address, ports without the load and store units. Which processors each model covers.
ModelRDMSR
Sandy Bridge100 / 0.33p015
Haswell, Broadwell, Skylake, Skylake-SP, Ice Lake100 / 0.25p0156
Alder Lake, Sapphire Rapids100 / 13.25p0 p1 p5 p6 p11
Lunar Lake100 / 0.17p012345
Bonnell78 / 39p01
Silvermont100 / 1FPC0
Piledriver100 / 0.5EX0 EX1
Zen, Zen 2100 / 0.25
Zen 3, Zen 4100 / 25ALU0 ALU1 ALU2 ALU3
Jaguar100 / 0.5ALU0 ALU1

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

Legacy forms
if CPL > 0:
    fault(GP, 0)
n = ecx                          # bits 63:32 of RCX do not count
if not msr_exists(n):
    fault(GP, 0)                 # reserved or not implemented
v = msr[n]
eax = v                          # bits 63:32 of RAX and RDX cleared
edx = v >> 32
# bits that the MSR does not implement read as undefined, Intel's
# manual says

Run on AMD Zen 5 (EPYC 9645): 2 cases. Every one raised an exception, at CPL 3, where the probe runs.

VEX and EVEX forms
if CPL > 0:
    fault(GP, 0)
n = src.read()                   # imm32: the MSR's number
if not msr_exists(n):
    fault(GP, 0)
dest.write(msr[n])               # all 64 bits

Not run on a processor: no processor at hand has MSR_IMM, the immediate forms of RDMSR and WRMSRNS.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
RDMSR
EAXimplicitwrite
EDXimplicitwrite
ECXimplicitread
MSRsimplicitread
RDMSR r64, imm32 64-bit mode only
r64explicitwrite
imm32explicitread
MSRsimplicitread

Flags

None: XED records no flag that the forms test or change.

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

Legacy forms
none in XED
VEX forms
MSR-IMM-VEX
EVEX forms
MSR-IMM-EVEX

Attributes

What else XED records about the forms. How to read.

All forms
privileged: CPL 0 only; may abort a TSX transaction

CPUID and processors

Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
PENTIUMREAL

No CPUID bit: part of the base instruction set.

Every x86-64 processor in XED’s model and Zen 3 to Zen 6
MSR_IMM

MSR_IMM
CPUID.(EAX=07H,ECX=1):ECX[5] MSR_IMM

Clearwater Forest
APX_F_MSR_IMM

APX_F + MSR_IMM
CPUID.(EAX=07H,ECX=1):EDX[21] APX_F
CPUID.(EAX=07H,ECX=1):ECX[5] MSR_IMM

None in XED’s chip model, which lists these instructions only under its placeholder for future processors.

More System instructions

More MSR_IMM instructions

More APX instructions

All 88 APX instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  4. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-544 (RDMSR)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3 (325384-093, September 2026)
  6. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
  7. AMD64 Architecture Programmer's Manual, Volume 2: System Programming (24593, rev. 3.46, October 2026)
  8. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
  9. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The timings come from LLVM's scheduling models, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.