diff mbox

qemu-kvm-x86: consider the irq0override flag in kvm_arch_init_irq_routing

Message ID 1284472300-4211-1-git-send-email-bernhard.kohl@nsn.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bernhard Kohl Sept. 14, 2010, 1:51 p.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index fd974b3..e35c234 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1388,9 +1388,9 @@  int kvm_arch_init_irq_routing(void)
             }
         }
         for (i = 0; i < 24; ++i) {
-            if (i == 0) {
+            if (i == 0 && irq0override) {
                 r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
-            } else if (i != 2) {
+            } else if (i != 2 || !irq0override) {
                 r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
             }
             if (r < 0) {