* [Qemu-devel] [6625] Generate PCI hotplug interrupt only if corespondent EN bit is set.
@ 2009-02-16 15:36 Anthony Liguori
0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-02-16 15:36 UTC (permalink / raw)
To: qemu-devel
Revision: 6625
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6625
Author: aliguori
Date: 2009-02-16 15:36:08 +0000 (Mon, 16 Feb 2009)
Log Message:
-----------
Generate PCI hotplug interrupt only if corespondent EN bit is set. (Gleb Natapov)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/hw/acpi.c
Modified: trunk/hw/acpi.c
===================================================================
--- trunk/hw/acpi.c 2009-02-16 15:36:03 UTC (rev 6624)
+++ trunk/hw/acpi.c 2009-02-16 15:36:08 UTC (rev 6625)
@@ -724,25 +724,25 @@
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);
+ }
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-16 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 15:36 [Qemu-devel] [6625] Generate PCI hotplug interrupt only if corespondent EN bit is set Anthony Liguori
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).