]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Fixes posted interrupt check for IRQs delivery modes
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tue, 7 Apr 2020 06:13:09 +0000 (01:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2020 05:58:29 +0000 (07:58 +0200)
commit4cbb69b45cad0f7c85726fa0cd5b309da0d5bee7
tree2f89098069c5108165ce4aea7e8bc90e7caeed96
parentdb00b1d9d71ad618af39a15cc93b41b9d222131b
KVM: x86: Fixes posted interrupt check for IRQs delivery modes

commit 637543a8d61c6afe4e9be64bfb43c78701a83375 upstream.

Current logic incorrectly uses the enum ioapic_irq_destination_types
to check the posted interrupt destination types. However, the value was
set using APIC_DM_XXX macros, which are left-shifted by 8 bits.

Fixes by using the APIC_DM_FIXED and APIC_DM_LOWEST instead.

Fixes: (fdcf75621375 'KVM: x86: Disable posted interrupts for non-standard IRQs delivery modes')
Cc: Alexander Graf <graf@amazon.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Message-Id: <1586239989-58305-1-git-send-email-suravee.suthikulpanit@amd.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h