qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata.rao@gmail.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Zhu Guihua" <zhugh.fnst@cn.fujitsu.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	tangchen@cn.fujitsu.com, "Gu Zheng" <guz.fnst@cn.fujitsu.com>,
	"isimatu yasuaki" <isimatu.yasuaki@jp.fujitsu.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	ChenFan <chen.fan.fnst@cn.fujitsu.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Anshul Makkar" <anshul.makkar@profitbricks.com>,
	"Andreas Färber" <afaerber@suse.de>
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	[thread overview]
Message-ID: <CAGZKiBpjRPVsW1vBsirwUaqT5mZ+433siWeuq_cN6EfbUJJEKg@mail.gmail.com> (raw)
In-Reply-To: <1442605096-14103-5-git-send-email-ehabkost@redhat.com>

On Sat, Sep 19, 2015 at 1:08 AM, Eduardo Habkost <ehabkost@redhat.com> 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	other threads:[~2015-09-21  5:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 19:38 [Qemu-devel] [PATCH v2 0/4] target-i386: Remove side-effects from X86CPU::instance_init Eduardo Habkost
2015-09-18 19:38 ` [Qemu-devel] [PATCH v2 1/4] target-i386: Rename optimize_flags_init() Eduardo Habkost
2015-09-18 19:38 ` [Qemu-devel] [PATCH v2 2/4] target-i386: Move TCG initialization check to tcg_x86_init() Eduardo Habkost
2015-09-18 19:38 ` [Qemu-devel] [PATCH v2 3/4] target-i386: Move TCG initialization to realize time Eduardo Habkost
2015-09-18 19:38 ` [Qemu-devel] [PATCH v2 4/4] target-i386: Call cpu_exec_init() on realize Eduardo Habkost
2015-09-21  5:41   ` Bharata B Rao [this message]
2015-09-21 14:15     ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZKiBpjRPVsW1vBsirwUaqT5mZ+433siWeuq_cN6EfbUJJEKg@mail.gmail.com \
    --to=bharata.rao@gmail.com \
    --cc=afaerber@suse.de \
    --cc=anshul.makkar@profitbricks.com \
    --cc=chen.fan.fnst@cn.fujitsu.com \
    --cc=ehabkost@redhat.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=imammedo@redhat.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=zhugh.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).