From: Paolo Bonzini <pbonzini@redhat.com>
To: Ting Wang <kathy.wangting@huawei.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qdev: The sequence of devices added to bus
Date: Mon, 19 Jan 2015 12:46:46 +0100 [thread overview]
Message-ID: <54BCEEA6.2060003@redhat.com> (raw)
In-Reply-To: <1421650918-90656-1-git-send-email-kathy.wangting@huawei.com>
On 19/01/2015 08:01, Ting Wang wrote:
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 901f289..7d830a6 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -89,7 +89,7 @@ static void bus_add_child(BusState *bus, DeviceState *child)
> kid->child = child;
> object_ref(OBJECT(kid->child));
>
> - QTAILQ_INSERT_HEAD(&bus->children, kid, sibling);
> + QTAILQ_INSERT_TAIL(&bus->children, kid, sibling);
>
> /* This transfers ownership of kid->child to the property. */
> snprintf(name, sizeof(name), "child[%d]", kid->index);
>
Hi Ting,
I think this patch had already been submitted in the past.
The result of the discussion was that:
1) the behavior you report was not reproduced consistently. This means
that it is either a race condition, or it depends on the kernel release.
In fact I think a race condition here is expected, and thus the patch
wouldn't entirely fix the problem.
2) This would be a change in the guest interface, so it is unfortunately
too late to do it unconditionally. You could do it only for new machine
types, but it would be a very intrusive change with very high
probability of breaking something---much more than anything else we do
for new machine types. So it is probably not a good idea.
Paolo
prev parent reply other threads:[~2015-01-19 11:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 7:01 [Qemu-devel] [PATCH] qdev: The sequence of devices added to bus Ting Wang
2015-01-19 11:46 ` Paolo Bonzini [this message]
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=54BCEEA6.2060003@redhat.com \
--to=pbonzini@redhat.com \
--cc=kathy.wangting@huawei.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.