Re: [PATCH v6 09/12] x86/msr: Remove wrmsr()

From: Ingo Molnar

Date: Sun Nov 22 2026 - 06:33:40 EST



* Juergen Gross <jgross@xxxxxxxx> wrote:

> wrmsr() has no users left. Delete it.

So there's a few uses left within comments:

# wrmsr:
Documentation/arch/x86/microcode.rst:performing the wrmsr(0x79) to rendezvous in the MCE handler and shutdown
arch/x86/events/amd/ibs.c: * \ wrmsr(IBS_{FETCH|OP}_CTL, new value);
arch/x86/events/intel/core.c: * Quirk only affects validation in wrmsr(), so wrmsrq()'s value
arch/x86/events/intel/lbr.c: * - For wrmsr(), bits 61:62 are considered part of the sign extension.
arch/x86/events/intel/lbr.c: * ... then any value passed to wrmsr() must be sign extended to 63 bits and any
arch/x86/include/asm/shared/msr.h: * The kernel proper already defines rdmsr()/wrmsr(), but they are not for the
drivers/platform/x86/intel/ifs/load.c: * Run wrmsr(MSR_COPY_SCAN_HASHES) for scan hash copy and run wrmsr(MSR_AUTHENTICATE_AND_COPY_CHUNK)

But we can (and should) do that in a separate patch.

Thanks,

Ingo