This is a note to let you know that I've just added the patch titled KVM: x86: Fixes posted interrupt check for IRQs delivery modes to the 5.6-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-x86-fixes-posted-interrupt-check-for-irqs-delivery-modes.patch and it can be found in the queue-5.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 637543a8d61c6afe4e9be64bfb43c78701a83375 Mon Sep 17 00:00:00 2001 From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> Date: Tue, 7 Apr 2020 01:13:09 -0500 Subject: KVM: x86: Fixes posted interrupt check for IRQs delivery modes From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> 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@xxxxxxxxxx> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> Message-Id: <1586239989-58305-1-git-send-email-suravee.suthikulpanit@xxxxxxx> Reviewed-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx> Tested-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/include/asm/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1664,8 +1664,8 @@ void kvm_set_msi_irq(struct kvm *kvm, st static inline bool kvm_irq_is_postable(struct kvm_lapic_irq *irq) { /* We can only post Fixed and LowPrio IRQs */ - return (irq->delivery_mode == dest_Fixed || - irq->delivery_mode == dest_LowestPrio); + return (irq->delivery_mode == APIC_DM_FIXED || + irq->delivery_mode == APIC_DM_LOWEST); } static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) Patches currently in stable-queue which might be from suravee.suthikulpanit@xxxxxxx are queue-5.6/kvm-x86-fixes-posted-interrupt-check-for-irqs-delivery-modes.patch queue-5.6/kvm-ioapic-restrict-lazy-eoi-update-to-edge-triggered-interrupts.patch