[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning
From: |
Peter Maydell |
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 |
On 26 October 2011 19:34, Stefan Weil <address@hidden> 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
- [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Stefan Weil, 2011/10/24
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Stefan Hajnoczi, 2011/10/26
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort?, Stefan Weil, 2011/10/26
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort?, Blue Swirl, 2011/10/26
- [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning (always return a value)), Stefan Weil, 2011/10/26
- Re: [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning (always return a value)), Blue Swirl, 2011/10/26
- Re: [Qemu-devel] [RFC] Introduce qemu_abort? (was: Fix compiler warning (always return a value)),
Peter Maydell <=
- Re: [Qemu-devel] [RFC] Introduce qemu_abort?, Markus Armbruster, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort?, Stefan Hajnoczi, 2011/10/27
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), introduce qemu_abort?, Alexander Graf, 2011/10/27
Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Markus Armbruster, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Stefan Hajnoczi, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Markus Armbruster, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Stefan Hajnoczi, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Markus Armbruster, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Stefan Hajnoczi, 2011/10/28
- Re: [Qemu-devel] [PATCH] Fix compiler warning (always return a value), Markus Armbruster, 2011/10/28