summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-16 15:36:08 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-16 15:36:08 +0000
commit1f0711e298ad9fc9c36a4d1c61d36d0dc4433f09 (patch)
treefcaa681336d63d10d6532e2c5a2e4a4dfdd3668e /hw
parent6eb011b038ccce4759312c834a3d7129f97bd3f0 (diff)
downloadhqemu-1f0711e298ad9fc9c36a4d1c61d36d0dc4433f09.zip
hqemu-1f0711e298ad9fc9c36a4d1c61d36d0dc4433f09.tar.gz
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6625 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/acpi.c b/hw/acpi.c
index a59d7e2..3185158 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -724,25 +724,25 @@ 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);
+ }
}
OpenPOWER on IntegriCloud