summaryrefslogtreecommitdiffstats
path: root/hw/ppc/spapr_cpu_core.c
diff options
context:
space:
mode:
authorCédric Le Goater2019-01-02 06:57:35 +0100
committerDavid Gibson2019-01-08 23:28:14 +0100
commit129dbe69266a9d5a4c492924a1d4b61a04f4cd7d (patch)
tree87b82f4d526a4a37047c0948e2ef9ca33e721d3f /hw/ppc/spapr_cpu_core.c
parentspapr: modify the prototype of the cpu_intc_create() method (diff)
downloadqemu-129dbe69266a9d5a4c492924a1d4b61a04f4cd7d.tar.gz
qemu-129dbe69266a9d5a4c492924a1d4b61a04f4cd7d.tar.xz
qemu-129dbe69266a9d5a4c492924a1d4b61a04f4cd7d.zip
ppc/xive: introduce a XiveTCTX pointer under PowerPCCPU
which will be used by the machine only when the XIVE interrupt mode is in use. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_cpu_core.c')
-rw-r--r--hw/ppc/spapr_cpu_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 2739b2a4b8..1473ef8533 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -194,7 +194,12 @@ static void spapr_unrealize_vcpu(PowerPCCPU *cpu, sPAPRCPUCore *sc)
vmstate_unregister(NULL, &vmstate_spapr_cpu_state, cpu->machine_data);
}
qemu_unregister_reset(spapr_cpu_reset, cpu);
- object_unparent(cpu->intc);
+ if (cpu->intc) {
+ object_unparent(cpu->intc);
+ }
+ if (cpu->tctx) {
+ object_unparent(OBJECT(cpu->tctx));
+ }
cpu_remove_sync(CPU(cpu));
object_unparent(OBJECT(cpu));
}