aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-06-17 17:01:03 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-06-17 17:01:03 +0000
commitbc26e55a6615dc594be425d293db40d5cdcdb84b (patch)
treeb8368f1f8e2d131cf265b414f554b0dce2d6f568 /hw
parent727170b67105fef0e229e4b2eef45f88f121aa8c (diff)
Revert "Update irqs on reset and device load"
This reverts commit 3dcd219f09d6c1817bf9a132899e6b925f7a0914. It is incorrect to call qemu_irq functions (or any other functions that access other device state) during savevm/loadvm. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/e1000.c10
-rw-r--r--hw/rtl8139.c2
2 files changed, 1 insertions, 11 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index cffcbde847..5f4b123695 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -150,18 +150,12 @@ ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr,
}
static void
-update_irqs(E1000State *s)
-{
- qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
-}
-
-static void
set_interrupt_cause(E1000State *s, int index, uint32_t val)
{
if (val)
val |= E1000_ICR_INT_ASSERTED;
s->mac_reg[ICR] = val;
- update_irqs(s);
+ qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
}
static void
@@ -978,7 +972,6 @@ nic_load(QEMUFile *f, void *opaque, int version_id)
for (j = 0; j < mac_regarraystosave[i].size; j++)
qemu_get_be32s(f,
s->mac_reg + mac_regarraystosave[i].array0 + j);
- update_irqs(s);
return 0;
}
@@ -1077,7 +1070,6 @@ static void e1000_reset(void *opaque)
memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
d->rxbuf_min_shift = 1;
memset(&d->tx, 0, sizeof d->tx);
- update_irqs(d);
}
static void pci_e1000_init(PCIDevice *pci_dev)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 13646062d7..0a66026633 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3317,8 +3317,6 @@ static int rtl8139_load(QEMUFile* f,void* opaque,int version_id)
s->cplus_enabled = s->CpCmd != 0;
}
- rtl8139_update_irq(s);
-
return 0;
}