mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
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>
This commit is contained in:
parent
aa5ac64b23
commit
d49e8a9b46
12 changed files with 65 additions and 20 deletions
|
@ -553,6 +553,14 @@ static int spapr_xive_cpu_intc_create(SpaprInterruptController *intc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void spapr_xive_cpu_intc_reset(SpaprInterruptController *intc,
|
||||
PowerPCCPU *cpu)
|
||||
{
|
||||
XiveTCTX *tctx = spapr_cpu_state(cpu)->tctx;
|
||||
|
||||
xive_tctx_reset(tctx);
|
||||
}
|
||||
|
||||
static void spapr_xive_set_irq(SpaprInterruptController *intc, int irq, int val)
|
||||
{
|
||||
SpaprXive *xive = SPAPR_XIVE(intc);
|
||||
|
@ -697,6 +705,7 @@ static void spapr_xive_class_init(ObjectClass *klass, void *data)
|
|||
sicc->activate = spapr_xive_activate;
|
||||
sicc->deactivate = spapr_xive_deactivate;
|
||||
sicc->cpu_intc_create = spapr_xive_cpu_intc_create;
|
||||
sicc->cpu_intc_reset = spapr_xive_cpu_intc_reset;
|
||||
sicc->claim_irq = spapr_xive_claim_irq;
|
||||
sicc->free_irq = spapr_xive_free_irq;
|
||||
sicc->set_irq = spapr_xive_set_irq;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue