[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CACZJ9cUY9ovqkazdcNCtJf=JPbwOO7+sqL2Xp6rBi_Jn1kx1bQ@mail.gmail.com>
Date: Mon, 30 Dec 2024 15:44:01 +0800
From: Liam Ni <zhiguangni01@...il.com>
To: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: Subject: [PATCH] x86: kvmclock: Clean up the usage of the
apic_lvt_mask array.
Clean up the usage of the apic_lvt_mask array.
Use LVT_TIMER instead of the number 0.
Signed-off-by: liamni <zhiguangni01@...il.com>
---
arch/x86/kvm/lapic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 3c83951c619e..949473e2cad8 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2357,7 +2357,7 @@ static int kvm_lapic_reg_write(struct kvm_lapic
*apic, u32 reg, u32 val)
case APIC_LVTT:
if (!kvm_apic_sw_enabled(apic))
val |= APIC_LVT_MASKED;
- val &= (apic_lvt_mask[0] | apic->lapic_timer.timer_mode_mask);
+ val &= (apic_lvt_mask[LVT_TIMER] |
apic->lapic_timer.timer_mode_mask);
kvm_lapic_set_reg(apic, APIC_LVTT, val);
apic_update_lvtt(apic);
break;
--
2.34.1
Powered by blists - more mailing lists