KVM: Define a new interface kvm_intr_is_single_vcpu()
authorFeng Wu <feng.wu@intel.com>
Fri, 18 Sep 2015 14:29:47 +0000 (22:29 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Oct 2015 13:06:49 +0000 (15:06 +0200)
commit8feb4a04dc756002f78df0026e58118669de4851
tree5805a8d7b71c693d71dacf1d417d1f600732cef9
parentebbfc765369690cf8fc512615e6b83ec1702f8ac
KVM: Define a new interface kvm_intr_is_single_vcpu()

This patch defines a new interface kvm_intr_is_single_vcpu(),
which can returns whether the interrupt is for single-CPU or not.

It is used by VT-d PI, since now we only support single-CPU
interrupts, For lowest-priority interrupts, if user configures
it via /proc/irq or uses irqbalance to make it single-CPU, we
can use PI to deliver the interrupts to it. Full functionality
of lowest-priority support will be added later.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/irq_comm.c
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h