[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr-cpu-core: Release ICPState object during CP
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH] spapr-cpu-core: Release ICPState object during CPU unrealization |
Date: |
Wed, 12 Apr 2017 10:47:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/12/2017 10:15 AM, Bharata B Rao wrote:
> Recent commits that re-organized ICPState object missed to destroy
> the object when CPU is unrealized. Fix this so that CPU unplug
> doesn't abort QEMU.
Indeed.
> Signed-off-by: Bharata B Rao <address@hidden>
I am wondering if we should not be doing the unparent under
spapr_cpu_destroy() or even xics_cpu_destroy(). Apart from
that,
Reviewed-by: Cédric Le Goater <address@hidden>
Thanks,
C.
> ---
> hw/ppc/spapr_cpu_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> index 2e689b5..4389ef4 100644
> --- a/hw/ppc/spapr_cpu_core.c
> +++ b/hw/ppc/spapr_cpu_core.c
> @@ -127,6 +127,7 @@ static void spapr_cpu_core_unrealizefn(DeviceState *dev,
> Error **errp)
> PowerPCCPU *cpu = POWERPC_CPU(cs);
>
> spapr_cpu_destroy(cpu);
> + object_unparent(cpu->intc);
> cpu_remove_sync(cs);
> object_unparent(obj);
> }
>