diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-02-05 15:42:57 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-02-11 14:14:14 +0200 |
commit | 0ff0501403a09a6445fc79da8e9344e9156db701 (patch) | |
tree | 638dfa8c507a565169209e81839bf225f17dfeaa | |
parent | b87d58dde329a7f2ecb3beec47a953c5aa964660 (diff) |
PCI hotplug SCI fixkvm-84rc1
Generate interrupt only if corespondent EN bit is set.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | hw/acpi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -811,25 +811,26 @@ void qemu_system_cpu_hot_add(int cpu, int state) static void enable_device(struct pci_status *p, struct gpe_regs *g, int slot) { g->sts |= 2; - g->en |= 2; p->up |= (1 << slot); } static void disable_device(struct pci_status *p, struct gpe_regs *g, int slot) { g->sts |= 2; - g->en |= 2; p->down |= (1 << slot); } void qemu_system_device_hot_add(int pcibus, int slot, int state) { - qemu_set_irq(pm_state->irq, 1); pci0_status.up = 0; pci0_status.down = 0; if (state) enable_device(&pci0_status, &gpe, slot); else disable_device(&pci0_status, &gpe, slot); - qemu_set_irq(pm_state->irq, 0); + + if (gpe.en & 2) { + qemu_set_irq(pm_state->irq, 1); + qemu_set_irq(pm_state->irq, 0); + } } |