diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-10-22 18:38:10 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-10-24 13:33:45 +1100 |
commit | d49e8a9b46e4594223806ae622af462ff7bfa158 (patch) | |
tree | 3e04bc8cdde19b9191801a57a9d2066de213348d /hw/ppc/pnv_core.c | |
parent | aa5ac64b2394712b6269d0b15ba06c9c564dee92 (diff) |
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>
Diffstat (limited to 'hw/ppc/pnv_core.c')
-rw-r--r-- | hw/ppc/pnv_core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index cc17bbfed8..be0310ac03 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -40,10 +40,11 @@ static const char *pnv_core_cpu_typename(PnvCore *pc) return cpu_type; } -static void pnv_core_cpu_reset(PowerPCCPU *cpu) +static void pnv_core_cpu_reset(PowerPCCPU *cpu, PnvChip *chip) { CPUState *cs = CPU(cpu); CPUPPCState *env = &cpu->env; + PnvChipClass *pcc = PNV_CHIP_GET_CLASS(chip); cpu_reset(cs); @@ -54,6 +55,8 @@ static void pnv_core_cpu_reset(PowerPCCPU *cpu) env->gpr[3] = PNV_FDT_ADDR; env->nip = 0x10; env->msr |= MSR_HVB; /* Hypervisor mode */ + + pcc->intc_reset(chip, cpu); } /* @@ -200,7 +203,7 @@ static void pnv_core_reset(void *dev) int i; for (i = 0; i < cc->nr_threads; i++) { - pnv_core_cpu_reset(pc->threads[i]); + pnv_core_cpu_reset(pc->threads[i], pc->chip); } } |