Skip to content

spapr/irq: remove the XICS offset adjustment for the dual machine

Cédric Le Goater qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2spapr/irq: add an 'nr_irq' parameter to initialize the backend.hw/ppc/spapr_irq.c include/hw/ppc/spapr_irq.h+11 -90 replies
2/2spapr/irq: remove the XICS offset adjustmenthw/ppc/spapr_irq.c+1 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] spapr/irq: remove the XICS offset adjustment for the dual machine

Hello,

When using the 'dual' interrupt mode, the source numbers of both sPAPR IRQ backends are aligned to share a common IRQ number space and to use a similar mapping of the machine qemu_irq array which is indexed by the source number.

The XICS IRQ number range initially being [ 0x1000 - 0x2000 ], this requires to change the XICS ICSState offset to 0 and to provision for an extra 4K of source numbers and qemu_irqs which will never be used by the machine when running under the XICS interrupt mode. This is not an optimal solution.

Moreover, the KVM support for the 'dual' interrupt mode will require some adjustments. The XICS KVM device considers that the IRQ numbers start at XICS_IRQ_BASE (0x1000) and we have no way to inform KVM of the offset change. We will need to ignore the lower 4K numbers when capturing or restoring the source states from the XICS KVM device.

The first patch allocates an IRQ number space of the expected size for the XICS sPAPR IRQ backend. The overall IRQ number space size and the qemu_irq array size is still the one required by the 'dual' sPAPR IRQ backend, that is, in sync with XIVE. The second patch removes the ICSState offset adjustment. This last change adds some benefits as it simplifies greatly the qirq() method of the 'dual' sPAPR IRQ backend.

C.

Cédric Le Goater (2):
spapr/irq: add an 'nr_irq' parameter to initialize the backend. spapr/irq: remove the XICS offset adjustment

 include/hw/ppc/spapr_irq.h |  2 +-
 hw/ppc/spapr_irq.c         | 45 ++++++++++----------------------------
 2 files changed, 12 insertions(+), 35 deletions(-)
Signature · 1 line
2.20.1