qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Stefan Weil <sw@weilnetz.de>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning (always return a value))
Date: Wed, 26 Oct 2011 21:36:05 +0100	[thread overview]
Message-ID: <CAFEAcA-ryQfAJNHcHbvPOxpr5yVCF-CLCH5RjZPeF3XVtX4C-Q@mail.gmail.com> (raw)
In-Reply-To: <4EA852D0.8080601@weilnetz.de>

On 26 October 2011 19:34, Stefan Weil <sw@weilnetz.de> wrote:
> Adding the infrastructure (macros / implementation) could be done
> faster. I suggest these interfaces in qemu-common.h:
>
> qemu_abort() - abort QEMU with a message containing function name,
> file name and line (macro, see message text in my previous mail cited above)
>
> qemu_fatal(formatstring, ...) - abort QEMU with a printf like message
> (function, prints "QEMU aborted, " and the text according to the parameters)

We already have a couple of "print a message and abort" functions:
  hw_error()  (prints "qemu: hardware error" message, dumps cpu state
               for all cores and abort()s)
  cpu_abort() (prints "qemu: fatal:" message, dumps cpu state for one
               core and abort()s)
  tcg_abort() (takes no arguments, acts like your proposed qemu_abort())

...perhaps we should try to straighten out the naming inconsistencies
here and document which ones to use when.

I think the qemu_fatal() might be better addressed as part of a set
of functions for handling fatal and other errors in a more consistent
way. At the moment it's a bit random whether a device model will
abort, warn but continue or silently continue if a guest does something
that tickles unimplemented behaviour or does something that's probably
a guest error (eg accessing nonexistent registers). It would be good
to have some of this be user configurable (some people want to see
"my guest OS is doing something that's probably a guest OS bug" warnings,
some don't, for instance).

Regarding whether to put this into qemu 1.0 or not -- my preference
would be for 'not' because any change touching a lot of files has
the potential to cause pending patches/pullreqs people are trying
to get in before the feature freeze deadline to no longer apply.

-- PMM

  parent reply	other threads:[~2011-10-26 20:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 20:18 [Qemu-devel] [PATCH] Fix compiler warning (always return a value) Stefan Weil
2011-10-26 12:54 ` Stefan Hajnoczi
2011-10-26 16:35   ` [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort? Stefan Weil
2011-10-26 17:49     ` Blue Swirl
2011-10-26 18:34       ` [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning (always return a value)) Stefan Weil
2011-10-26 18:48         ` Blue Swirl
2011-10-26 20:36         ` Peter Maydell [this message]
2011-10-28  7:53           ` [Qemu-devel] [RFC] Introduce qemu_abort? Markus Armbruster
2011-10-27  7:11     ` [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort? Stefan Hajnoczi
2011-10-27  8:24     ` Alexander Graf
2011-10-28  7:40   ` [Qemu-devel] [PATCH] Fix compiler warning (always return a value) Markus Armbruster
2011-10-28  8:49     ` Stefan Hajnoczi
2011-10-28  8:59       ` Markus Armbruster
2011-10-28  9:02         ` Stefan Hajnoczi
2011-10-28 11:07           ` Markus Armbruster
2011-10-28 12:41             ` Stefan Hajnoczi
2011-10-28 14:39               ` Markus Armbruster
2011-10-28 16:40                 ` Paolo Bonzini

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=CAFEAcA-ryQfAJNHcHbvPOxpr5yVCF-CLCH5RjZPeF3XVtX4C-Q@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).