From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH-for-5.1 v2] hw/isa/isa-superio: Fix IDE controller realization
Date: Tue, 1 Sep 2020 09:02:58 +0200 [thread overview]
Message-ID: <3d71c7f7-a66e-3db6-4389-77c27f9cd8f9@vivier.eu> (raw)
In-Reply-To: <20200721124516.9602-1-f4bug@amsat.org>
Le 21/07/2020 à 14:45, Philippe Mathieu-Daudé a écrit :
> When realizing a Super I/O with IDE controller [*], we get:
>
> qom/object.c:1684: object_property_try_add_child: Assertion `!child->parent' failed.
> Aborted (core dumped)
>
> This is because the device is already realized when we try to
> add the QOM property to the parent. Fix by realizing *after*
> adding the QOM relationship.
>
> [*] Set ISASuperIOClass::ide.count = N with N not zero
> (no such thing currently exists; the bug is latent)
>
> Fixes: e508430619 ("hw/isa/superio: Make the components QOM children")
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> v2: Reword bug is latent (Markus)
> ---
> hw/isa/isa-superio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
> index e2e47d8fd9..179c185695 100644
> --- a/hw/isa/isa-superio.c
> +++ b/hw/isa/isa-superio.c
> @@ -158,8 +158,8 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
> if (k->ide.get_irq) {
> qdev_prop_set_uint32(d, "irq", k->ide.get_irq(sio, 0));
> }
> - isa_realize_and_unref(isa, bus, &error_fatal);
> object_property_add_child(OBJECT(sio), "isa-ide", OBJECT(isa));
> + isa_realize_and_unref(isa, bus, &error_fatal);
> sio->ide = isa;
> trace_superio_create_ide(0,
> k->ide.get_iobase ?
>
Applied to my trivial-patches branch.
Thanks,
Laurent
prev parent reply other threads:[~2020-09-01 7:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 12:45 [PATCH-for-5.1 v2] hw/isa/isa-superio: Fix IDE controller realization Philippe Mathieu-Daudé
2020-07-27 14:42 ` Paolo Bonzini
2020-09-01 7:02 ` Laurent Vivier [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=3d71c7f7-a66e-3db6-4389-77c27f9cd8f9@vivier.eu \
--to=laurent@vivier.eu \
--cc=armbru@redhat.com \
--cc=f4bug@amsat.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 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).