diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index fbb4e0da15..e06321cf15 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -80,7 +80,6 @@ #define TIMEBASE_FREQ 512000000ULL #define MAX_CPUS 256 -#define XICS_IRQS 1024 #define PHANDLE_XICP 0x00001111 diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 3b01beadbb..988f8cb858 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -876,6 +876,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, _FDT(fdt_setprop(fdt, bus_off, "ranges", &ranges, sizeof(ranges))); _FDT(fdt_setprop(fdt, bus_off, "reg", &bus_reg, sizeof(bus_reg))); _FDT(fdt_setprop_cell(fdt, bus_off, "ibm,pci-config-space-type", 0x1)); + _FDT(fdt_setprop_cell(fdt, bus_off, "ibm,pe-total-#msi", XICS_IRQS)); /* Build the interrupt-map, this must matches what is done * in pci_spapr_map_irq diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 0d7673de94..85e4c8a3dd 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -152,6 +152,8 @@ struct ICSIRQState { uint8_t status; }; +#define XICS_IRQS 1024 + qemu_irq xics_get_qirq(XICSState *icp, int irq); void xics_set_irq_type(XICSState *icp, int irq, bool lsi);