summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorHaiwei Li <lihaiwei@tencent.com>2020-07-21 11:23:54 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-07-27 17:40:25 +0300
commit9c2475f3e46a1de22bcae3b2c98c398937261c8a (patch)
tree9202f6a48839dc6fed7ab5f608685f06f89a6fb7 /arch/x86/kvm/lapic.c
parent033555f6eb60787bd40e34d7abeacaebdcd4c54e (diff)
downloadlinux-9c2475f3e46a1de22bcae3b2c98c398937261c8a.tar.xz
KVM: Using macros instead of magic values
Instead of using magic values, use macros. Signed-off-by: Haiwei Li <lihaiwei@tencent.com> Message-Id: <4c072161-80dd-b7ed-7adb-02acccaa0701@gmail.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 47801a44cfa6..d5fb2ea2fadb 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2083,7 +2083,8 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
case APIC_SELF_IPI:
if (apic_x2apic_mode(apic)) {
- kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff));
+ kvm_lapic_reg_write(apic, APIC_ICR,
+ APIC_DEST_SELF | (val & APIC_VECTOR_MASK));
} else
ret = 1;
break;