From: "Andreas Färber" <afaerber@suse.de>
To: Amos Kong <akong@redhat.com>, qemu-devel@nongnu.org
Cc: hutao@cn.fujitsu.com, armbru@redhat.com, aliguori@amazon.com,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PCTCH v4] qdev: set properties after device's parent is assigned
Date: Mon, 03 Mar 2014 17:01:34 +0100 [thread overview]
Message-ID: <5314A75E.6030007@suse.de> (raw)
In-Reply-To: <1393862124-26806-1-git-send-email-akong@redhat.com>
Hi,
Am 03.03.2014 16:55, schrieb Amos Kong:
> Test steps:
> (qemu) device_add e1000,addr=adsf
> Property 'e1000.addr' doesn't take value 'adsf'
> (qemu) info qtree
> Then qemu crashed.
>
> Currently we set a link to the new device for qdev parent bus, but the
> device hasn't been added to QOM tree. When it fails to set properties,
> object_unparent() can't cleanup the device.
>
> Delay device property setting until device's parent is assigned. This
> way when property setting fails, object_unparent() can cleanup failed
> device properly.
>
> Signed-off-by: Amos Kong <akong@redhat.com>
> Reviewed-By: Igor Mammedov <imammedo@redhat.com>
> ---
> V2: fix bz by adjust the initialization order (Paolo)
> V3: fix bug without making it differs with legacy devices
> creation (Andreas)
> V4: update subject and commitlog
I already applied a variation of v3. In particular I used qdev-monitor
for consistency and clarified that it is about device_add.
https://github.com/afaerber/qemu-cpu/commits/qom-next
If you don't like something in there, can you please just suggest an
alternative sentence/paragraph for me to update?
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2014-03-03 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 15:55 [Qemu-devel] [PCTCH v4] qdev: set properties after device's parent is assigned Amos Kong
2014-03-03 16:01 ` Andreas Färber [this message]
2014-03-03 16:15 ` Amos Kong
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=5314A75E.6030007@suse.de \
--to=afaerber@suse.de \
--cc=akong@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.