[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/28] spapr: move CPU reset after presenter creation
From: |
David Gibson |
Subject: |
[PULL 22/28] spapr: move CPU reset after presenter creation |
Date: |
Thu, 24 Oct 2019 19:18:07 +1100 |
From: Cédric Le Goater <address@hidden>
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é <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 3e4302c7d5..2b21285d20 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);
--
2.21.0
- [PULL 12/28] spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController, (continued)
- [PULL 12/28] spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 23/28] spapr_cpu_core: Implement DeviceClass::reset, David Gibson, 2019/10/24
- [PULL 28/28] spapr/xive: Set the OS CAM line at reset, David Gibson, 2019/10/24
- [PULL 10/28] spapr: Formalize notion of active interrupt controller, David Gibson, 2019/10/24
- [PULL 15/28] spapr: Remove SpaprIrq::init_kvm hook, David Gibson, 2019/10/24
- [PULL 21/28] spapr: Don't request to unplug the same core twice, David Gibson, 2019/10/24
- [PULL 09/28] spapr, xics, xive: Move irq claim and free from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 17/28] spapr, xics, xive: Move SpaprIrq::post_load hook to backends, David Gibson, 2019/10/24
- [PULL 13/28] spapr, xics, xive: Move dt_populate from SpaprIrq to SpaprInterruptController, David Gibson, 2019/10/24
- [PULL 27/28] ppc/pnv: Fix naming of routines realizing the CPUs, David Gibson, 2019/10/24
- [PULL 22/28] spapr: move CPU reset after presenter creation,
David Gibson <=
- [PULL 18/28] spapr: Remove SpaprIrq::nr_msis, David Gibson, 2019/10/24
- [PULL 24/28] ppc/pnv: Introduce a PnvCore reset handler, David Gibson, 2019/10/24
- [PULL 14/28] spapr, xics, xive: Match signatures for XICS and XIVE KVM connect routines, David Gibson, 2019/10/24
- [PULL 20/28] pseries: Update SLOF firmware image, David Gibson, 2019/10/24
- [PULL 19/28] spapr: Move SpaprIrq::nr_xirqs to SpaprMachineClass, David Gibson, 2019/10/24
- [PULL 25/28] ppc/pnv: Add a PnvChip pointer to PnvCore, David Gibson, 2019/10/24
- [PULL 26/28] ppc: Reset the interrupt presenter from the CPU reset handler, David Gibson, 2019/10/24
- [PULL 16/28] spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate, David Gibson, 2019/10/24
- Re: [PULL 00/28] ppc-for-4.2 queue 20191024, Peter Maydell, 2019/10/24