[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/43] spapr/irq: remove the XICS offset adjustment
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 16/43] spapr/irq: remove the XICS offset adjustment |
Date: |
Tue, 19 Feb 2019 01:30:22 +1100 |
From: Cédric Le Goater <address@hidden>
Now that we have changed the XICS and the XIVE interrupt backend to
have different size for their IRQ number space, we do not need to
align their source numbers anymore. Remove the offset adjustment and
wire the dual 'qirq' handler to the 'qirq' handler of the current
interrupt mode in use.
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_irq.c | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
index da52a46e80..48d6b2daed 100644
--- a/hw/ppc/spapr_irq.c
+++ b/hw/ppc/spapr_irq.c
@@ -453,17 +453,6 @@ static void spapr_irq_init_dual(sPAPRMachineState *spapr,
int nr_irqs,
return;
}
- /*
- * Align the XICS and the XIVE IRQ number space under QEMU.
- *
- * However, the XICS KVM device still considers that the IRQ
- * numbers should start at XICS_IRQ_BASE (0x1000). Either we
- * should introduce a KVM device ioctl to set the offset or ignore
- * the lower 4K numbers when using the get/set ioctl of the XICS
- * KVM device. The second option seems the least intrusive.
- */
- spapr->ics->offset = 0;
-
spapr_irq_xive.init(spapr, spapr_irq_xive.nr_irqs, &local_err);
if (local_err) {
error_propagate(errp, local_err);
@@ -500,21 +489,7 @@ static void spapr_irq_free_dual(sPAPRMachineState *spapr,
int irq, int num)
static qemu_irq spapr_qirq_dual(sPAPRMachineState *spapr, int irq)
{
- sPAPRXive *xive = spapr->xive;
- ICSState *ics = spapr->ics;
-
- if (irq >= spapr->irq->nr_irqs) {
- return NULL;
- }
-
- /*
- * The IRQ number should have been claimed under both interrupt
- * controllers.
- */
- assert(!ICS_IRQ_FREE(ics, irq - ics->offset));
- assert(xive_eas_is_valid(&xive->eat[irq]));
-
- return spapr->qirqs[irq];
+ return spapr_irq_current(spapr)->qirq(spapr, irq);
}
static void spapr_irq_print_info_dual(sPAPRMachineState *spapr, Monitor *mon)
--
2.20.1
- [Qemu-devel] [PULL 03/43] target/ppc: Enable reporting of SPRs to GDB, (continued)
- [Qemu-devel] [PULL 03/43] target/ppc: Enable reporting of SPRs to GDB, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 05/43] spapr_pci: Fix interrupt leak in rtas_ibm_change_msi() error path, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 02/43] spapr: Rename xics to intc in interrupt controller agnostic code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 04/43] target/ppc: Fix msync to do what hardware does, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 07/43] spapr: Disallow unsupported kernel-irqchip settings, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 06/43] cuda: decrease time delay before raising VIA SR interrupt and remove fast path, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 08/43] mac_newworld: change default NIC to sungem for mac99 machine, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 10/43] ppc: fix crash during branch stepping, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 09/43] target/ppc: Remove some #if 0'ed code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 11/43] xive: Only set source type for LSIs, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 16/43] spapr/irq: remove the XICS offset adjustment,
David Gibson <=
- [Qemu-devel] [PULL 17/43] xics: Explicitely call KVM ICP methods from the common code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 13/43] target/ppc: Disable ISA 2.06 PM instructions on POWER9, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 19/43] xics: Handle KVM ICP realize from the common code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 12/43] qdev: pass an Object * to qbus_set_hotplug_handler(), David Gibson, 2019/02/18
- [Qemu-devel] [PULL 15/43] spapr/irq: add an 'nr_irq' parameter to initialize the backend., David Gibson, 2019/02/18
- [Qemu-devel] [PULL 18/43] xics: Handle KVM ICP reset from the common code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 14/43] spapr: fix out of bounds write in spapr_populate_drmem_v2, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 23/43] xics: Handle KVM ICS reset from the "simple" ICS code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 22/43] xics: Explicitely call KVM ICS methods from the common code, David Gibson, 2019/02/18
- [Qemu-devel] [PULL 27/43] target/ppc: convert VMX logical instructions to use vector operations, David Gibson, 2019/02/18