Skip to content

Commit 9c2475f

Browse files
Haiwei Libonzini
authored andcommitted
KVM: Using macros instead of magic values
Instead of using magic values, use macros. Signed-off-by: Haiwei Li <[email protected]> Message-Id: <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 033555f commit 9c2475f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kvm/lapic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,8 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
20832083

20842084
case APIC_SELF_IPI:
20852085
if (apic_x2apic_mode(apic)) {
2086-
kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff));
2086+
kvm_lapic_reg_write(apic, APIC_ICR,
2087+
APIC_DEST_SELF | (val & APIC_VECTOR_MASK));
20872088
} else
20882089
ret = 1;
20892090
break;

0 commit comments

Comments
 (0)