From: Juergen Gross <[email protected]> Sent: Monday, November 16, 2026 10:39 AM
> 
> The __rdmsr() helper will be changed soon, so don't use it directly
> outside of msr.h. Switch to native_rdmsrq() in HyperV related code.
> 
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/202602182222.WEBLSQRj-
> [email protected]/
> Signed-off-by: Juergen Gross <[email protected]>
> ---
> V4:
> - new patch (kernel test robot)
> ---
>  arch/x86/hyperv/hv_crash.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/hyperv/hv_crash.c b/arch/x86/hyperv/hv_crash.c
> index 5ffcc23255de..28ee76e18d9b 100644
> --- a/arch/x86/hyperv/hv_crash.c
> +++ b/arch/x86/hyperv/hv_crash.c
> @@ -217,9 +217,9 @@ static void hv_hvcrash_ctxt_save(void)
>       native_store_gdt(&ctxt->gdtr);
>       store_idt(&ctxt->idtr);
> 
> -     ctxt->gsbase = __rdmsr(MSR_GS_BASE);
> -     ctxt->efer = __rdmsr(MSR_EFER);
> -     ctxt->pat = __rdmsr(MSR_IA32_CR_PAT);
> +     ctxt->gsbase = native_rdmsrq(MSR_GS_BASE);
> +     ctxt->efer = native_rdmsrq(MSR_EFER);
> +     ctxt->pat = native_rdmsrq(MSR_IA32_CR_PAT);
>  }
> 
>  /* Add trampoline page to the kernel pagetable for transition to kernel PT */
> --
> 2.56.0
> 

Reviewed-by: Michael Kelley <[email protected]>


Reply via email to