[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init()
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init() |
Date: |
Fri, 14 Oct 2016 17:04:08 +0200 |
On Fri, 14 Oct 2016 14:13:12 +0200
Laurent Vivier <address@hidden> wrote:
> On 14/10/2016 09:56, Greg Kurz wrote:
> > On Thu, 13 Oct 2016 18:24:43 +0200
> > Laurent Vivier <address@hidden> wrote:
> >
> >> Extract the realize part to cpu_exec_realize(), update all
> >> calls to cpu_exec_init() to add cpu_exec_realize() to
> >> have no functionnal change.
> >>
> >> Put in cpu_exec_init() what initializes the CPU,
> >> in cpu_exec_realize() what adds it to the environment.
> >>
> >> Remove error parameter from cpu_exec_init() as it can't fail.
> >>
> >> Rename cpu_exec_exit() with cpu_exec_unrealize():
> >> cpu_exec_exit() is undoing what it has been done by cpu_exec_realize(), so
> >> call it cpu_exec_unrealize().
> >>
> >> CC: Paolo Bonzini <address@hidden>
> >> Signed-off-by: Laurent Vivier <address@hidden>
> >> ---
> >
> > Just one question: is there a reason that prevents cpu_exec_unrealize() to
> > be
> > declared in include/exec/exec-all.h next to cpu_exec_realize() ?
>
> because qom/cpu.c doesn't include exec-all.h (and we can't as exec-all.h
> is target specific and qom/cpu.c is common code).
>
That's a good reason indeed, even if cpu_exec_realize() and cpu_exec_unrealize()
could theorically be compiled only twice: once for system, once for user.
> Laurent
Thanks !
--
Greg
[Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init, Laurent Vivier, 2016/10/13