KVM: x86: store IOAPIC-handled vectors in each VCPU
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 29 Jul 2015 08:43:18 +0000 (10:43 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Oct 2015 13:06:23 +0000 (15:06 +0200)
commit3bb345f387dd26beb097cf776e342bc0d96d805a
tree39b5e7634f75136c0b8917211b04462d5831735d
parentbdaffe1d93e7eddbcc71d074a5d49eba7fe1c765
KVM: x86: store IOAPIC-handled vectors in each VCPU

We can reuse the algorithm that computes the EOI exit bitmap to figure
out which vectors are handled by the IOAPIC.  The only difference
between the two is for edge-triggered interrupts other than IRQ8
that have no notifiers active; however, the IOAPIC does not have to
do anything special for these interrupts anyway.

This again limits the interactions between the IOAPIC and the LAPIC,
making it easier to move the former to userspace.

Inspired by a patch from Steve Rutherford.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/ioapic.c
arch/x86/kvm/ioapic.h
arch/x86/kvm/lapic.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c