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

WRMSRNS writes a model-specific register as WRMSR does, EDX:EAX into the MSR whose number is in ECX, with the same checks: CPL 0 or real mode, an MSR that exists, no reserved bit set and, for the MSRs that hold addresses, a canonical address, each failure raising #GP(0). What it drops is serialization. WRMSR waits for everything before it to finish and its buffered stores to reach memory before the next instruction starts; WRMSRNS does not. Intel’s manual still promises that instructions before it use the old value of the MSR and those after it the new one, and that an MSR whose write invalidates the TLBs, such as an MTRR, does so here too. Some processors may serialize anyway for certain MSRs, but nothing may rely on it.

Where it pays

Intel’s manual suggests WRMSRNS in place of WRMSR wherever the serialization is not needed, for speed. Linux’s wrmsrns() helper uses WRMSRNS where CPUID leaf 7, sub-leaf 1, reports it (EAX bit 19) and is patched to an ordinary WRMSR elsewhere, written with a redundant DS prefix so that both take 3 bytes. KVM, for one, uses it for MSRs that it writes while a guest’s values are loaded. Code that relied on WRMSR to serialize needs SERIALIZE instead, which Intel’s manual suggests also ahead of a WRMSRNS that changes the controls of performance-monitoring events that count stores only as they drain to memory: without it, stores from before the write may be counted under the new controls.

The immediate form

With MSR_IMM (CPUID leaf 7, sub-leaf 1, ECX bit 5), a VEX form in 64-bit mode takes the MSR number as a 32-bit immediate and the whole 64-bit value from one general-purpose register, so no ECX, EDX or EAX need setting up; APX adds an EVEX form that can name the new registers. It is the write that the immediate form of RDMSR pairs with. Outside 64-bit mode, or without the feature, the form raises #UD.

Not run here

The probe runs at CPL 3, and the Zen 5 guest it ran on reports neither WRMSRNS nor MSR_IMM, so it never ran either form; AMD’s manuals do not describe the instruction. GCC 14 and Clang 23 have no intrinsic for it, and their assemblers know the mnemonic, encoding it as 0F 01 C6.

Forms

Every encoding of WRMSRNS that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
WRMSRNS WRMSRNSNP 0F 01 C6WRMSRNS
WRMSRNS imm32, r64 64-bit mode only WRMSRNS_IMM32_GPR64u64VEX.LZ.F3.MAP7.WIG F6 /0 idMSR_IMM
WRMSRNS imm32, r64 WRMSRNS_IMM32_GPR64u64_APXEVEX.LLZ.F3.MAP7.WIG F6 /0 idAPX_F + MSR_IMM

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, RAX and RDX do
v = edx << 32 | eax              # not count
if not msr_allows(n, v):
    fault(GP, 0)                 # as WRMSR's checks
msr[n] = v                       # not serializing, unlike WRMSR:
                                 # what follows sees the new value,
                                 # but stores before it may still
                                 # be on their way to memory

Not run on a processor: the Zen 5 guest that ran the probe does not report WRMSRNS in CPUID.

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

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
WRMSRNS
EAXimplicitread
EDXimplicitread
ECXimplicitread
MSRsimplicitwrite
WRMSRNS imm32, r64 64-bit mode only
imm32explicitread
r64explicitread
MSRsimplicitwrite

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
WRMSRNS

WRMSRNS
CPUID.(EAX=07H,ECX=1):EAX[19] WRMSRNS

Panther Lake, Nova Lake, Diamond Rapids, Sierra Forest, Clearwater Forest
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 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. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2D, page 6-12 (WRMSRNS)
  3. Intel Advanced Performance Extensions (Intel APX) Architecture Specification, revision 9.0 (355828-009, August 2026)
  4. Linux 7.3: arch/x86/include/asm/msr.h, lines 230-243 (wrmsrns(): WRMSRNS, or a WRMSR with a DS prefix where it is missing)
  5. Linux 7.3: arch/x86/kvm/vmx/ (KVM on Intel's VMX: vmenter.S, vmx_ops.h and vmx.c)

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 text is our own.