aboutsummaryrefslogtreecommitdiff
path: root/hw/isa
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2023-04-03 09:41:21 +0200
committerAnthony PERARD <anthony.perard@citrix.com>2023-06-07 15:07:10 +0100
commit60a9eb57f337ee36cb9140154a83edb2c41f00c6 (patch)
treec0db0ff9d4edab8068a0e8e2d9f3cee2904ed995 /hw/isa
parenta58a31a6a18ab650c6b676eccf98b6f68ac672d0 (diff)
hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3
xen_intx_set_irq() doesn't depend on PIIX3State. In order to resolve TYPE_PIIX3_XEN_DEVICE and in order to make Xen agnostic about the precise south bridge being used, set up Xen's PCI IRQ handling of PIIX3 in the board. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com> Tested-by: Chuck Zmudzinski <brchuckz@aol.com> Message-Id: <20230312120221.99183-4-shentey@gmail.com> Message-Id: <20230403074124.3925-5-shentey@gmail.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'hw/isa')
-rw-r--r--hw/isa/piix3.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
index 800b80f2bb..0b7e9ade0d 100644
--- a/hw/isa/piix3.c
+++ b/hw/isa/piix3.c
@@ -35,8 +35,6 @@
#include "migration/vmstate.h"
#include "hw/acpi/acpi_aml_interface.h"
-#define XEN_IOAPIC_NUM_PIRQS 128ULL
-
static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq)
{
qemu_set_irq(piix3->pic[pic_irq],
@@ -403,32 +401,12 @@ static const TypeInfo piix3_info = {
.class_init = piix3_class_init,
};
-static void piix3_xen_realize(PCIDevice *dev, Error **errp)
-{
- ERRP_GUARD();
- PIIX3State *piix3 = PIIX3_PCI_DEVICE(dev);
- PCIBus *pci_bus = pci_get_bus(dev);
-
- piix3_realize(dev, errp);
- if (*errp) {
- return;
- }
-
- /*
- * Xen supports additional interrupt routes from the PCI devices to
- * the IOAPIC: the four pins of each PCI device on the bus are also
- * connected to the IOAPIC directly.
- * These additional routes can be discovered through ACPI.
- */
- pci_bus_irqs(pci_bus, xen_intx_set_irq, piix3, XEN_IOAPIC_NUM_PIRQS);
-}
-
static void piix3_xen_class_init(ObjectClass *klass, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->config_write = piix3_write_config_xen;
- k->realize = piix3_xen_realize;
+ k->realize = piix3_realize;
}
static const TypeInfo piix3_xen_info = {