All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, "Greg Kurz" <groug@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	David Gibson <david@gibson.dropbear.id.au>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Crashes with qemu-system-ppc64
Date: Wed, 24 Mar 2021 11:10:01 +0100	[thread overview]
Message-ID: <d4f10ff3-8a19-bbec-b998-b8d189801c4e@redhat.com> (raw)
In-Reply-To: <72f4839a-2a0d-f73b-bbde-8cad398dbbc9@amsat.org>

On 24/03/2021 00.35, Philippe Mathieu-Daudé wrote:
[...]
> Hmmm does this assert() matches your comment?
> 
> -- >8 --
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index cefc5eaa0a9..41cbee77d14 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -1130,6 +1130,8 @@ Object *qdev_get_machine(void)
>   {
>       static Object *dev;
> 
> +    assert(phase_check(PHASE_MACHINE_CREATED));
> +
>       if (dev == NULL) {
>           dev = container_get(object_get_root(), "/machine");
>       }

Sounds like a good idea, but I think it should be sufficient to put it into 
the if-statement instead.
Could you send it as a proper patch?

  Thomas



  parent reply	other threads:[~2021-03-24 10:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 16:48 Crashes with qemu-system-ppc64 Thomas Huth
2021-03-23 18:20 ` Philippe Mathieu-Daudé
2021-03-23 21:19 ` Mark Cave-Ayland
2021-03-23 22:57   ` Peter Maydell
2021-03-25 12:57     ` Mark Cave-Ayland
2021-03-25 13:25       ` Peter Maydell
2021-03-23 23:00 ` Greg Kurz
2021-03-23 23:35   ` Philippe Mathieu-Daudé
2021-03-24  8:10     ` Greg Kurz
2021-03-24  9:17     ` Paolo Bonzini
2021-03-25 10:27       ` Greg Kurz
2021-03-24 10:10     ` Thomas Huth [this message]
2021-03-24 10:32       ` Thomas Huth

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=d4f10ff3-8a19-bbec-b998-b8d189801c4e@redhat.com \
    --to=thuth@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=f4bug@amsat.org \
    --cc=groug@kaod.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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.