Also zero pci_irq_levels on reset to avoid stuck irq after reset.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Yaniv Kamay <ykamay@redhat.com>
}
}
-static void piix3_reset(PCIDevice *d)
+static void piix3_reset(void *opaque)
{
+ PCIDevice *d = opaque;
uint8_t *pci_conf = d->config;
pci_conf[0x04] = 0x07; // master, memory and I/O
pci_conf[0xab] = 0x00;
pci_conf[0xac] = 0x00;
pci_conf[0xae] = 0x00;
+
+ memset(pci_irq_levels, 0, sizeof(pci_irq_levels));
}
static void piix4_reset(PCIDevice *d)
PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION; // header_type = PCI_multifunction, generic
piix3_reset(d);
+ qemu_register_reset(piix3_reset, 0, d);
return d->devfn;
}