Skip to content

Commit d647062

Browse files
Liam Nisean-jc
authored andcommitted
KVM: x86: Use LVT_TIMER instead of an open coded literal
Use LVT_TIMER instead of the literal '0' to clean up the apic_lvt_mask lookup when emulating handling writes to APIC_LVTT. No functional change intended. Signed-off-by: Liam Ni <zhiguangni01@gmail.com> [sean: manually regenerate patch (whitespace damaged), massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 0e77b32 commit d647062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/lapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2357,7 +2357,7 @@ static int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
23572357
case APIC_LVTT:
23582358
if (!kvm_apic_sw_enabled(apic))
23592359
val |= APIC_LVT_MASKED;
2360-
val &= (apic_lvt_mask[0] | apic->lapic_timer.timer_mode_mask);
2360+
val &= (apic_lvt_mask[LVT_TIMER] | apic->lapic_timer.timer_mode_mask);
23612361
kvm_lapic_set_reg(apic, APIC_LVTT, val);
23622362
apic_update_lvtt(apic);
23632363
break;

0 commit comments

Comments
 (0)