qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/4] target-i386: Call cpu_exec_init() on rea


From: Bharata B Rao
Subject: Re: [Qemu-devel] [PATCH v2 4/4] target-i386: Call cpu_exec_init() on realize
Date: Mon, 21 Sep 2015 11:11:47 +0530

On Sat, Sep 19, 2015 at 1:08 AM, Eduardo Habkost <address@hidden> wrote:
> QOM instance_init functions are not supposed to have any side-effects,
> as new objects may be created at any moment for querying property
> information (see qmp_device_list_properties()).
>
> Calling cpu_exec_init() also affects QEMU's ability to handle errors
> during CPU creation, as some actions done by cpu_exec_init() can't be
> reverted.
>
> Move cpu_exec_init() call to realize so a simple object_new() won't
> trigger it, and so that it is called after some basic validation of CPU
> parameters.

Since you are moving cpu_exec_init() to realize, does it make sense to
define unrealize and call cpu_exec_exit() from it ?

Regards,
Bharata.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]