ppc: Reset the interrupt presenter from the CPU reset handler
commitd49e8a9b46e4594223806ae622af462ff7bfa158
authorCédric Le Goater <clg@kaod.org>
Tue, 22 Oct 2019 16:38:10 +0000 (22 18:38 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 24 Oct 2019 02:33:45 +0000 (24 13:33 +1100)
tree3e04bc8cdde19b9191801a57a9d2066de213348d
parentaa5ac64b2394712b6269d0b15ba06c9c564dee92
ppc: Reset the interrupt presenter from the CPU reset handler

On the sPAPR machine and PowerNV machine, the interrupt presenters are
created by a machine handler at the core level and are reset
independently. This is not consistent and it raises issues when it
comes to handle hot-plugged CPUs. In that case, the presenters are not
reset. This is less of an issue in XICS, although a zero MFFR could
be a concern, but in XIVE, the OS CAM line is not set and this breaks
the presenting algorithm. The current code has workarounds which need
a global cleanup.

Extend the sPAPR IRQ backend and the PowerNV Chip class with a new
cpu_intc_reset() handler called by the CPU reset handler and remove
the XiveTCTX reset handler which is now redundant.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20191022163812.330-6-clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
12 files changed:
hw/intc/spapr_xive.c
hw/intc/xics.c
hw/intc/xics_spapr.c
hw/intc/xive.c
hw/ppc/pnv.c
hw/ppc/pnv_core.c
hw/ppc/spapr_cpu_core.c
hw/ppc/spapr_irq.c
include/hw/ppc/pnv.h
include/hw/ppc/spapr_irq.h
include/hw/ppc/xics.h
include/hw/ppc/xive.h