summaryrefslogtreecommitdiff
path: root/arch/ia64/kvm/kvm-ia64.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-11-19 13:58:46 +0200
committerAvi Kivity <avi@redhat.com>2009-03-24 11:03:06 +0200
commit399ec807ddc38ecccf8c06dbde04531cbdc63e11 (patch)
tree75a4e3ee9cfffb4ecf7b4608bb592c89f2b62219 /arch/ia64/kvm/kvm-ia64.c
parent193554750441d91e127dd5066b8aebe0f769101c (diff)
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>
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 1477f91617a5..dbf527a57341 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -919,6 +919,11 @@ long kvm_arch_vm_ioctl(struct file *filp,
r = kvm_ioapic_init(kvm);
if (r)
goto out;
+ r = kvm_setup_default_irq_routing(kvm);
+ if (r) {
+ kfree(kvm->arch.vioapic);
+ goto out;
+ }
break;
case KVM_IRQ_LINE: {
struct kvm_irq_level irq_event;