Commit bc26e55a6615dc594be425d293db40d5cdcdb84b
1 parent
727170b6
Revert "Update irqs on reset and device load"
This reverts commit 3dcd219f. 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>
Showing
2 changed files
with
1 additions
and
11 deletions
hw/e1000.c
| ... | ... | @@ -150,18 +150,12 @@ ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr, |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | static void |
| 153 | -update_irqs(E1000State *s) | |
| 154 | -{ | |
| 155 | - qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0); | |
| 156 | -} | |
| 157 | - | |
| 158 | -static void | |
| 159 | 153 | set_interrupt_cause(E1000State *s, int index, uint32_t val) |
| 160 | 154 | { |
| 161 | 155 | if (val) |
| 162 | 156 | val |= E1000_ICR_INT_ASSERTED; |
| 163 | 157 | s->mac_reg[ICR] = val; |
| 164 | - update_irqs(s); | |
| 158 | + qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0); | |
| 165 | 159 | } |
| 166 | 160 | |
| 167 | 161 | static void |
| ... | ... | @@ -978,7 +972,6 @@ nic_load(QEMUFile *f, void *opaque, int version_id) |
| 978 | 972 | for (j = 0; j < mac_regarraystosave[i].size; j++) |
| 979 | 973 | qemu_get_be32s(f, |
| 980 | 974 | s->mac_reg + mac_regarraystosave[i].array0 + j); |
| 981 | - update_irqs(s); | |
| 982 | 975 | return 0; |
| 983 | 976 | } |
| 984 | 977 | |
| ... | ... | @@ -1077,7 +1070,6 @@ static void e1000_reset(void *opaque) |
| 1077 | 1070 | memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init); |
| 1078 | 1071 | d->rxbuf_min_shift = 1; |
| 1079 | 1072 | memset(&d->tx, 0, sizeof d->tx); |
| 1080 | - update_irqs(d); | |
| 1081 | 1073 | } |
| 1082 | 1074 | |
| 1083 | 1075 | static void pci_e1000_init(PCIDevice *pci_dev) | ... | ... |