[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 46/78] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 46/78] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device |
Date: |
Thu, 19 Oct 2023 14:23:13 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
Thie PIIX3 south bridge implements both the PIC and the ISA bus, so wiring the
interrupts there makes the device model more self-contained. Furthermore, this
allows the ISA interrupts to be wired to internal child devices in
pci_piix3_realize() which will be performed in subsequent patches.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20231007123843.127151-10-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 | 2 +-
hw/isa/piix3.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index cd6c00c0b3..5988656279 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -293,6 +293,7 @@ static void pc_init1(MachineState *machine,
} else {
isa_bus = isa_bus_new(NULL, system_memory, system_io,
&error_abort);
+ isa_bus_register_input_irqs(isa_bus, x86ms->gsi);
rtc_state = isa_new(TYPE_MC146818_RTC);
qdev_prop_set_int32(DEVICE(rtc_state), "base_year", 2000);
@@ -301,7 +302,6 @@ static void pc_init1(MachineState *machine,
i8257_dma_init(isa_bus, 0);
pcms->hpet_enabled = false;
}
- isa_bus_register_input_irqs(isa_bus, x86ms->gsi);
if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) {
pc_i8259_create(isa_bus, gsi_state->i8259_irq);
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
index 616f5418fa..3e7c42fa68 100644
--- a/hw/isa/piix3.c
+++ b/hw/isa/piix3.c
@@ -278,6 +278,8 @@ static void pci_piix3_realize(PCIDevice *dev, Error **errp)
memory_region_add_subregion_overlap(pci_address_space_io(dev),
PIIX_RCR_IOPORT, &d->rcr_mem, 1);
+ isa_bus_register_input_irqs(isa_bus, d->isa_irqs_in);
+
i8257_dma_init(isa_bus, 0);
/* RTC */
--
MST
- [PULL v2 50/78] hw/isa/piix3: Create power management controller in host device, (continued)
- [PULL v2 50/78] hw/isa/piix3: Create power management controller in host device, Michael S. Tsirkin, 2023/10/19
- [PULL v2 34/78] virtio: call ->vhost_reset_device() during reset, Michael S. Tsirkin, 2023/10/19
- [PULL v2 38/78] hw/i386/pc: Merge two if statements into one, Michael S. Tsirkin, 2023/10/19
- [PULL v2 41/78] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Michael S. Tsirkin, 2023/10/19
- [PULL v2 22/78] tests: bios-tables-test: Add test for smbios type4 thread count2, Michael S. Tsirkin, 2023/10/19
- [PULL v2 26/78] vhost-user: factor out "vhost_user_write_sync", Michael S. Tsirkin, 2023/10/19
- [PULL v2 32/78] vhost-user: do not send RESET_OWNER on device reset, Michael S. Tsirkin, 2023/10/19
- [PULL v2 40/78] hw/i386/pc_piix: Assign PIIX3's ISA interrupts before its realize(), Michael S. Tsirkin, 2023/10/19
- [PULL v2 43/78] hw/i386/pc_piix: Remove redundant "piix3" variable, Michael S. Tsirkin, 2023/10/19
- [PULL v2 42/78] hw/i386/pc_piix: Wire PIIX3's ISA interrupts by new "isa-irqs" property, Michael S. Tsirkin, 2023/10/19
- [PULL v2 46/78] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device,
Michael S. Tsirkin <=
- [PULL v2 51/78] hw/isa/piix3: Drop the "3" from PIIX base class name, Michael S. Tsirkin, 2023/10/19
- [PULL v2 54/78] hw/isa/piix4: Rename reset control operations to match PIIX3, Michael S. Tsirkin, 2023/10/19
- [PULL v2 56/78] hw/isa/piix3: Merge hw/isa/piix4.c, Michael S. Tsirkin, 2023/10/19
- [PULL v2 59/78] hw/isa/piix: Harmonize names of reset control memory regions, Michael S. Tsirkin, 2023/10/19
- [PULL v2 62/78] hw/isa/piix: Rename functions to be shared for PCI interrupt triggering, Michael S. Tsirkin, 2023/10/19
- [PULL v2 65/78] hw/isa/piix: Implement multi-process QEMU support also for PIIX4, Michael S. Tsirkin, 2023/10/19
- [PULL v2 37/78] hw/display: fix memleak from virtio_add_resource, Michael S. Tsirkin, 2023/10/19
- [PULL v2 49/78] hw/isa/piix3: Create USB controller in host device, Michael S. Tsirkin, 2023/10/19
- [PULL v2 53/78] hw/isa/piix4: Rename "isa" attribute to "isa_irqs_in", Michael S. Tsirkin, 2023/10/19
- [PULL v2 63/78] hw/isa/piix: Reuse PIIX3's PCI interrupt triggering in PIIX4, Michael S. Tsirkin, 2023/10/19