Subject: [PATCH] x86: kvmclock: Clean up the usage of the apic_lvt_mask array.

Liam Ni posted 1 patch 1 year, 4 months ago
arch/x86/kvm/lapic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Subject: [PATCH] x86: kvmclock: Clean up the usage of the apic_lvt_mask array.
Posted by Liam Ni 1 year, 4 months ago
Clean up the usage of the apic_lvt_mask array.
Use LVT_TIMER instead of the number 0.

Signed-off-by: liamni <zhiguangni01@gmail.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
Re: Subject: [PATCH] x86: kvmclock: Clean up the usage of the apic_lvt_mask array.
Posted by Sean Christopherson 1 year, 4 months ago
The shortlog scope is wrong, this has nothing to do with kvmclock.  It should be:

KVM: x86:

On Mon, 30 Dec 2024 15:44:01 +0800, Liam Ni wrote:
> Clean up the usage of the apic_lvt_mask array.
> Use LVT_TIMER instead of the number 0.

Your mail client is broken.  The subject repeats "Subject: ", and the patch is
whitespace damaged.  I manually recreated the patch because it's a no-brainer and
trivial, but in most cases I won't put in the effort for patches that don't apply.
Please fix your setup.

With that said, applied to kvm-x86 misc.  Thanks!

[1/1] KVM: x86: Use LVT_TIMER instead of an open coded literal
      https://github.com/kvm-x86/linux/commit/d6470627f584

--
https://github.com/kvm-x86/linux/tree/next