This is a note to let you know that I've just added the patch titled KVM: Using macros instead of magic values to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-using-macros-instead-of-magic-values.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c9dc1d71195527f1e0f9da9ed5569b4cd78e9a5b Author: Haiwei Li <lihaiwei@xxxxxxxxxxx> Date: Tue Jul 21 16:23:54 2020 +0800 KVM: Using macros instead of magic values [ Upstream commit 9c2475f3e46a1de22bcae3b2c98c398937261c8a ] Instead of using magic values, use macros. Signed-off-by: Haiwei Li <lihaiwei@xxxxxxxxxxx> Message-Id: <4c072161-80dd-b7ed-7adb-02acccaa0701@xxxxxxxxx> Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Stable-dep-of: ba5838abb053 ("KVM: x86: Inject #GP if WRMSR sets reserved bits in APIC Self-IPI") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 027941e3df682..81801b0c24e9a 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1921,7 +1921,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;