[tip: x86/msr] x86/hyperv: Stop using 32-bit MSR interfaces
From: tip-bot2 for Juergen Gross
Date: Fri Jul 03 2026 - 05:40:20 EST
The following commit has been merged into the x86/msr branch of tip:
Commit-ID: f1b599106414c72695298a70605efc36ea4988cc
Gitweb: https://git.kernel.org/tip/f1b599106414c72695298a70605efc36ea4988cc
Author: Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Mon, 29 Jun 2026 08:05:18 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Fri, 03 Jul 2026 11:33:59 +02:00
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 <jgross@xxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>
Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Cc: Long Li <longli@xxxxxxxxxxxxx>
Cc: Wei Liu <wei.liu@xxxxxxxxxx>
Link: https://patch.msgid.link/20260629060526.3638272-28-jgross@xxxxxxxx
---
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 a8de503..95f1782 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);