From f1b599106414c72695298a70605efc36ea4988cc Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Mon, 29 Jun 2026 08:05:18 +0200 Subject: [PATCH] x86/hyperv: Stop using 32-bit MSR interfaces The 32-bit MSR interface rdmsr() is planned to be removed. Use the related 64-bit variant instead. This conversion also simplifies the code a bit. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Cc: K. Y. Srinivasan Cc: Dexuan Cui Cc: Haiyang Zhang Cc: Long Li Cc: Wei Liu Link: https://patch.msgid.link/20260629060526.3638272-28-jgross@suse.com --- arch/x86/hyperv/hv_apic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index a8de503def37..95f1782d1e17 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -60,17 +60,15 @@ void hv_enable_coco_interrupt(unsigned int cpu, unsigned int vector, bool set) static u32 hv_apic_read(u32 reg) { - u32 reg_val, hi; + struct msr reg_val; switch (reg) { case APIC_EOI: - rdmsr(HV_X64_MSR_EOI, reg_val, hi); - (void)hi; - return reg_val; + rdmsrq(HV_X64_MSR_EOI, reg_val.q); + return reg_val.l; case APIC_TASKPRI: - rdmsr(HV_X64_MSR_TPR, reg_val, hi); - (void)hi; - return reg_val; + rdmsrq(HV_X64_MSR_TPR, reg_val.q); + return reg_val.l; default: return native_apic_mem_read(reg);