OSDN Git Service

hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize()
authorBernhard Beschow <shentey@gmail.com>
Sat, 7 Oct 2023 12:38:11 +0000 (14:38 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 22 Oct 2023 09:18:16 +0000 (05:18 -0400)
commit8b6cf5128ee510729895e00a669fa7ce7457c949
tree1fde847b987e73318d64228a17e05f980713bd52
parentfe9a7350c2900c9609e7a8ce1e042e3458a245e2
hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize()

Unlike its PIIX4 counterpart, TYPE_PIIX3_DEVICE doesn't instantiate a PIC
itself. Instead, it relies on the board to do so. This means that the board
needs to wire the ISA IRQs to the PIIX3 device model. As long as the board
assigns the ISA IRQs after PIIX3's realize(), internal devices can't be wired in
pci_piix3_realize() since the qemu_irqs are still NULL. Fix that by assigning
the ISA interrupts before realize(). This will allow for embedding child devices
into the host device as already done for PIIX4.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20231007123843.127151-4-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc_piix.c