Re: [PATCH 1/2] x86/boot: Move boot_*msr helpers to asm/shared/msr.h

From: Tom Lendacky
Date: Fri Aug 08 2025 - 14:07:24 EST


On 8/6/25 15:46, John Allen wrote:
> The boot_rdmsr and boot_wrmsr helpers used to reduce the need for inline
> assembly in the boot kernel can also be useful in code shared by boot
> and run-time kernel code. Move these helpers to asm/shared/msr.h and
> rename to raw_rdmsr and raw_wrmsr to indicate that these may also be
> used outside of the boot kernel.
>
> Signed-off-by: John Allen <john.allen@xxxxxxx>

Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>

> ---
> arch/x86/boot/compressed/sev.c | 7 ++++---
> arch/x86/boot/compressed/sev.h | 6 +++---
> arch/x86/boot/cpucheck.c | 16 ++++++++--------
> arch/x86/boot/msr.h | 26 --------------------------
> arch/x86/include/asm/shared/msr.h | 15 +++++++++++++++
> 5 files changed, 30 insertions(+), 40 deletions(-)
> delete mode 100644 arch/x86/boot/msr.h
>