[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 07/14] spapr: increase the size of the IRQ number space
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 07/14] spapr: increase the size of the IRQ number space |
Date: |
Tue, 25 Sep 2018 17:01:47 +1000 |
From: Cédric Le Goater <address@hidden>
The new layout using static IRQ number does not leave much space to
the dynamic MSI range, only 0x100 IRQ numbers. Increase the total
number of IRQS for newer machines and introduce a legacy XICS backend
for pre-3.1 machines to maintain compatibility.
For the old backend, provide a 'nr_msis' value covering the full IRQ
number space as it does not use the bitmap allocator to allocate MSI
interrupt numbers.
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 1 +
hw/ppc/spapr_irq.c | 15 ++++++++++++++-
include/hw/ppc/spapr_irq.h | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 4a9dd4d9bc..eba7d60a30 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3971,6 +3971,7 @@ static void spapr_machine_3_0_class_options(MachineClass
*mc)
SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_0);
smc->legacy_irq_allocation = true;
+ smc->irq = &spapr_irq_xics_legacy;
}
DEFINE_SPAPR_MACHINE(3_0, "3.0", false);
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
index fe8be5f521..e77b94cc68 100644
--- a/hw/ppc/spapr_irq.c
+++ b/hw/ppc/spapr_irq.c
@@ -195,7 +195,7 @@ static void spapr_irq_print_info_xics(sPAPRMachineState
*spapr, Monitor *mon)
ics_pic_print_info(spapr->ics, mon);
}
-#define SPAPR_IRQ_XICS_NR_IRQS 0x400
+#define SPAPR_IRQ_XICS_NR_IRQS 0x1000
#define SPAPR_IRQ_XICS_NR_MSIS \
(XICS_IRQ_BASE + SPAPR_IRQ_XICS_NR_IRQS - SPAPR_IRQ_MSI)
@@ -289,3 +289,16 @@ int spapr_irq_find(sPAPRMachineState *spapr, int num, bool
align, Error **errp)
return first + ics->offset;
}
+
+#define SPAPR_IRQ_XICS_LEGACY_NR_IRQS 0x400
+
+sPAPRIrq spapr_irq_xics_legacy = {
+ .nr_irqs = SPAPR_IRQ_XICS_LEGACY_NR_IRQS,
+ .nr_msis = SPAPR_IRQ_XICS_LEGACY_NR_IRQS,
+
+ .init = spapr_irq_init_xics,
+ .claim = spapr_irq_claim_xics,
+ .free = spapr_irq_free_xics,
+ .qirq = spapr_qirq_xics,
+ .print_info = spapr_irq_print_info_xics,
+};
diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h
index 650f810ad2..a467ce696e 100644
--- a/include/hw/ppc/spapr_irq.h
+++ b/include/hw/ppc/spapr_irq.h
@@ -41,6 +41,7 @@ typedef struct sPAPRIrq {
} sPAPRIrq;
extern sPAPRIrq spapr_irq_xics;
+extern sPAPRIrq spapr_irq_xics_legacy;
int spapr_irq_claim(sPAPRMachineState *spapr, int irq, bool lsi, Error **errp);
void spapr_irq_free(sPAPRMachineState *spapr, int irq, int num);
--
2.17.1
- [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180925, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 03/14] hw/ppc: on 40p machine, change default firmware to OpenBIOS, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 06/14] spapr: introduce a spapr_irq class 'nr_msis' attribute, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 02/14] target/ppc/cpu-models: Re-group the 970 CPUs together again, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 05/14] 40p: use OR gate to wire up raven PCI interrupts, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 07/14] spapr: increase the size of the IRQ number space,
David Gibson <=
- [Qemu-ppc] [PULL 04/14] raven: some minor IRQ-related tidy-ups, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 01/14] Record history of ppcemb target in common.json, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 12/14] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 08/14] spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 09/14] sm501: Adjust endianness of pixel value in rectangle fill, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 14/14] 40p: add fixed IRQ routing for LSI SCSI device, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 11/14] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline(), David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 10/14] scsi: add lsi53c8xx_handle_legacy_cmdline() function, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 13/14] lsi53c895a: add optional external IRQ via qdev, David Gibson, 2018/09/25
- Re: [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180925, Peter Maydell, 2018/09/25