KVM: Userspace controlled irq routing
authorAvi Kivity <avi@redhat.com>
Wed, 19 Nov 2008 11:58:46 +0000 (13:58 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:03:06 +0000 (11:03 +0200)
commit399ec807ddc38ecccf8c06dbde04531cbdc63e11
tree75a4e3ee9cfffb4ecf7b4608bb592c89f2b62219
parent193554750441d91e127dd5066b8aebe0f769101c
KVM: Userspace controlled irq routing

Currently KVM has a static routing from GSI numbers to interrupts (namely,
0-15 are mapped 1:1 to both PIC and IOAPIC, and 16:23 are mapped 1:1 to
the IOAPIC).  This is insufficient for several reasons:

- HPET requires non 1:1 mapping for the timer interrupt
- MSIs need a new method to assign interrupt numbers and dispatch them
- ACPI APIC mode needs to be able to reassign the PCI LINK interrupts to the
  ioapics

This patch implements an interrupt routing table (as a linked list, but this
can be easily changed) and a userspace interface to replace the table.  The
routing table is initialized according to the current hardwired mapping.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/ia64/kvm/kvm-ia64.c
arch/x86/kvm/x86.c
include/linux/kvm.h
include/linux/kvm_host.h
virt/kvm/irq_comm.c
virt/kvm/kvm_main.c