Patchwork fix bug of isa_bus irq

login
register
mail settings
Submitter Wanpeng Li
Date March 11, 2012, 6:39 a.m.
Message ID <1331447955-3679-1-git-send-email-liwp@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/145942/
State New
Headers show

Comments

Wanpeng Li - March 11, 2012, 6:39 a.m.
ISA bus only use IRQ 0~15, so don't need to give an array qemu_irq 0~24, just
array qemu_irq i8259 is ok.

Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
---
 hw/pc_piix.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 63dba4e..52f7cf8 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -210,7 +210,6 @@  static void pc_init1(MemoryRegion *system_memory,
         isa_bus = isa_bus_new(NULL, system_io);
         no_hpet = 1;
     }
-    isa_bus_irqs(isa_bus, gsi);
 
     if (kvm_irqchip_in_kernel()) {
         i8259 = kvm_i8259_init(isa_bus);
@@ -221,6 +220,8 @@  static void pc_init1(MemoryRegion *system_memory,
         i8259 = i8259_init(isa_bus, cpu_irq[0]);
     }
 
+    isa_bus_irqs(isa_bus, i8259);
+
     for (i = 0; i < ISA_NUM_IRQS; i++) {
         gsi_state->i8259_irq[i] = i8259[i];
     }