[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v3 1/3] exec: split cpu_exec_init()
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-ppc] [PATCH v3 1/3] exec: split cpu_exec_init() |
Date: |
Mon, 17 Oct 2016 16:46:57 -0200 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Sat, Oct 15, 2016 at 12:52:47AM +0200, Laurent Vivier wrote:
> Put in cpu_exec_initfn() what initializes the CPU,
> and let in cpu_exec_init() what adds it to the environment.
>
> As cpu_exec_initfn() is called by all XX_cpu_initfn() call it
> directly in cpu_common_initfn().
> cpu_exec_init() is now a realize function, it will be renamed
> to cpu_exec_realizefn() and moved to the XX_cpu_realizefn()
> function in a following patch.
>
> Signed-off-by: Laurent Vivier <address@hidden>
Confirmed that:
* cpu->num_ases and cpu->as are never changed by architecture
code before calling cpu_exec_init()
* cpu_exec_exit() is called on cpu_common_finalize()
* The cpu->memory reference will be dropped automatically
because the property is registered using
OBJ_PROP_LINK_UNREF_ON_RELEASE
BTW, the cpu->as and cpu->num_ases lines are redundant, because
QOM objects are guaranteed to be zeroed when allocated.
Reviewed-by: Eduardo Habkost <address@hidden>
--
Eduardo