]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kvm/x86.c
KVM: x86: fix interrupt window handling in split IRQ chip case
authorMatt Gingell <gingell@google.com>
Tue, 17 Nov 2015 16:32:05 +0000 (17:32 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Nov 2015 11:25:37 +0000 (12:25 +0100)
commit127a457acb2131fdb31c68c98cf11eda8ba7b380
tree161e0007cbd4e13af7850921d1558bbf5078afad
parent585bb8f9a5e592f2ce7abbe5ed3112d5438d2754
KVM: x86: fix interrupt window handling in split IRQ chip case

This patch ensures that dm_request_for_irq_injection and
post_kvm_run_save are in sync, avoiding that an endless ping-pong
between userspace (who correctly notices that IF=0) and
the kernel (who insists that userspace handles its request
for the interrupt window).

To synchronize them, it also adds checks for kvm_arch_interrupt_allowed
and !kvm_event_needs_reinjection.  These are always needed, not
just for in-kernel LAPIC.

Signed-off-by: Matt Gingell <gingell@google.com>
[A collage of two patches from Matt. - Paolo]
Fixes: 1c1a9ce973a7863dd46767226bce2a5f12d48bc6
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c