qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set.
@ 2009-02-12  8:10 Gleb Natapov
  2009-02-16 15:36 ` Anthony Liguori
  2009-02-16 15:42 ` Marcelo Tosatti
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2009-02-12  8:10 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Gleb Natapov <gleb@redhat.com>
---

 hw/acpi.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/acpi.c b/hw/acpi.c
index 5eac1ad..2375f20 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -724,27 +724,27 @@ void qemu_system_hot_add_init(void)
 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 bus, 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);
+    }
 }
 
 struct acpi_table_header

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-16 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12  8:10 [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set Gleb Natapov
2009-02-16 15:36 ` Anthony Liguori
2009-02-16 15:42 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).