• E
    target-i386: Call cpu_exec_init() on realize · 42ecabaa
    Eduardo Habkost 提交于
    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.
    Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
    Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
    42ecabaa
cpu.c 108.4 KB