[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 24/62] hw/i386/pc_piix: Assign PIIX3's ISA interrupts before it
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v3 24/62] hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize() |
|
Date: |
Sun, 22 Oct 2023 05:23:40 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6d2f5509e6..a003923788 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -265,6 +265,8 @@ static void pc_init1(MachineState *machine,
PCIDevice *pci_dev;
pci_dev = pci_new_multifunction(-1, TYPE_PIIX3_DEVICE);
+ piix3 = PIIX3_PCI_DEVICE(pci_dev);
+ piix3->pic = x86ms->gsi;
pci_realize_and_unref(pci_dev, pci_bus, &error_fatal);
if (xen_enabled()) {
@@ -281,8 +283,6 @@ static void pc_init1(MachineState *machine,
XEN_IOAPIC_NUM_PIRQS);
}
- piix3 = PIIX3_PCI_DEVICE(pci_dev);
- piix3->pic = x86ms->gsi;
piix3_devfn = piix3->dev.devfn;
isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(piix3), "isa.0"));
rtc_state = ISA_DEVICE(object_resolve_path_component(OBJECT(pci_dev),
--
MST
- [PULL v3 15/62] memory: initialize 'fv' in MemoryRegionCache to make Coverity happy, (continued)
- [PULL v3 15/62] memory: initialize 'fv' in MemoryRegionCache to make Coverity happy, Michael S. Tsirkin, 2023/10/22
- [PULL v3 12/62] vhost-user: hoist "write_sync", "get_features", "get_u64", Michael S. Tsirkin, 2023/10/22
- [PULL v3 17/62] vhost-backend: remove vhost_kernel_reset_device(), Michael S. Tsirkin, 2023/10/22
- [PULL v3 16/62] vhost-user: do not send RESET_OWNER on device reset, Michael S. Tsirkin, 2023/10/22
- [PULL v3 19/62] hw/i386/acpi-build: Remove build-time assertion on PIIX/ICH9 reset registers being identical, Michael S. Tsirkin, 2023/10/22
- [PULL v3 21/62] hw/display: fix memleak from virtio_add_resource, Michael S. Tsirkin, 2023/10/22
- [PULL v3 18/62] virtio: call ->vhost_reset_device() during reset, Michael S. Tsirkin, 2023/10/22
- [PULL v3 22/62] hw/i386/pc: Merge two if statements into one, Michael S. Tsirkin, 2023/10/22
- [PULL v3 23/62] hw/i386/pc_piix: Allow for setting properties before realizing PIIX3 south bridge, Michael S. Tsirkin, 2023/10/22
- [PULL v3 20/62] timer/i8254: Fix one shot PIT mode, Michael S. Tsirkin, 2023/10/22
- [PULL v3 24/62] hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize(),
Michael S. Tsirkin <=
- [PULL v3 26/62] hw/i386/pc_piix: Wire PIIX3's ISA interrupts by new "isa-irqs" property, Michael S. Tsirkin, 2023/10/22
- [PULL v3 25/62] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Michael S. Tsirkin, 2023/10/22
- [PULL v3 27/62] hw/i386/pc_piix: Remove redundant "piix3" variable, Michael S. Tsirkin, 2023/10/22
- [PULL v3 28/62] hw/isa/piix3: Rename "pic" attribute to "isa_irqs_in", Michael S. Tsirkin, 2023/10/22
- [PULL v3 29/62] hw/i386/pc_q35: Wire ICH9 LPC function's interrupts before its realize(), Michael S. Tsirkin, 2023/10/22
- [PULL v3 31/62] hw/i386/pc: Wire RTC ISA IRQs in south bridges, Michael S. Tsirkin, 2023/10/22
- [PULL v3 30/62] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device, Michael S. Tsirkin, 2023/10/22
- [PULL v3 32/62] hw/isa/piix3: Create IDE controller in host device, Michael S. Tsirkin, 2023/10/22
- [PULL v3 33/62] hw/isa/piix3: Create USB controller in host device, Michael S. Tsirkin, 2023/10/22
- [PULL v3 34/62] hw/isa/piix3: Create power management controller in host device, Michael S. Tsirkin, 2023/10/22