diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-10-22 18:38:06 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-10-24 13:32:33 +1100 |
commit | 90f8db52bb7ea387ff45ac12bb73935b7fc27794 (patch) | |
tree | 35f10552ec911ad0d1873e8437526562e827842b /hw | |
parent | 47c8c915b1628360d4d7d483e421e49b6bcfc371 (diff) | |
download | qemu-90f8db52bb7ea387ff45ac12bb73935b7fc27794.zip qemu-90f8db52bb7ea387ff45ac12bb73935b7fc27794.tar.gz qemu-90f8db52bb7ea387ff45ac12bb73935b7fc27794.tar.bz2 |
spapr: move CPU reset after presenter creation
This change prepares ground for future changes which will reset the
interrupt presenter in the reset handler of the sPAPR and PowerNV
cores.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20191022163812.330-2-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_cpu_core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 3e4302c..2b21285 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -234,13 +234,16 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, cpu_ppc_set_vhyp(cpu, PPC_VIRTUAL_HYPERVISOR(spapr)); kvmppc_set_papr(cpu); - qemu_register_reset(spapr_cpu_reset, cpu); - spapr_cpu_reset(cpu); - if (spapr_irq_cpu_intc_create(spapr, cpu, &local_err) < 0) { - goto error_unregister; + goto error_intc_create; } + /* + * FIXME: Hot-plugged CPUs are not reset. Do it at realize. + */ + qemu_register_reset(spapr_cpu_reset, cpu); + spapr_cpu_reset(cpu); + if (!sc->pre_3_0_migration) { vmstate_register(NULL, cs->cpu_index, &vmstate_spapr_cpu_state, cpu->machine_data); @@ -248,8 +251,7 @@ static void spapr_realize_vcpu(PowerPCCPU *cpu, SpaprMachineState *spapr, return; -error_unregister: - qemu_unregister_reset(spapr_cpu_reset, cpu); +error_intc_create: cpu_remove_sync(CPU(cpu)); error: error_propagate(errp, local_err); |