From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Anthony Liguori" <aliguori@us.ibm.com>,
qemu-trivial <qemu-trivial@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] ide: log error when trying to use ATAPI overlapping features
Date: Mon, 11 Feb 2013 16:10:46 +0100 [thread overview]
Message-ID: <511909F6.7060002@suse.de> (raw)
In-Reply-To: <CAJSP0QWpPAJ9kcfK9fwhDm0g1Zaf=5g7NH3jRcsaGUv3prAOCA@mail.gmail.com>
Am 11.02.2013 15:57, schrieb Stefan Hajnoczi:
> On Mon, Feb 11, 2013 at 3:34 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 11 February 2013 14:19, Andreas Färber <afaerber@suse.de> wrote:
>>> Am 11.02.2013 15:01, schrieb Markus Armbruster:
>>>> Kevin Wolf <kwolf@redhat.com> writes:
>>>>
>>>>> Am 11.02.2013 14:27, schrieb Stefan Hajnoczi:
>>>>>> I think we need to side-track this patch email to figure out what to
>>>>>> use:
>>>>>>
>>>>>> fprintf(stderr) - some warnings/errors use this
>>>>>> error_report() - goes to the monitor, if possible, otherwise stderr
>>>>>
>>>>> These look wrong to me.
>>>>
>>>> "Wrong" is a bit strong, in particular since there's ample precedence
>>>> for these uses.
>>
>> Certainly for fprintf() I would say "deprecated" wherever
>> we have a better API available.
>>
>>>>>> qemu_log_*() - goes to the qemu log, seems a little TCG-centric
>>>>>
>>>>> I would suggest either this or just trace points. (And by the way, it's
>>>>> a pity that -d is so TCG-centric, it's been more than once the reason
>>>>> why I disabled KVM when debugging a guest... Having at least -d int
>>>>> would be so useful.)
>>>>
>>>> Tracepoints don't really fit when we want to report the guest does
>>>> something we don't handle. Users deserve fair warning then, don't they?
>>>>
>>>> Could qemu_log() & friends be made fit for general use? What's missing?
>>>
>>> Blue already did some work to make it more usable, and I believe Peter
>>> adopted LOG_UNIMPL for ARM devices in place of hw_error()
>>
>> Yes; in particular where we have classes of error message which the
>> user may wish to enable or disable (of which "QEMU doesn't implement
>> this" and "the guest just did something that's probably a guest bug"
>> are two common ones) qemu_log_mask(LOG_*, ...) is the preferred
>> API for devices IMHO. So I think Herve's patch is entirely the
>> right thing.
>
> qemu_log_mask() can replace fprintf() but it needs to default to
> stderr and a reasonable default mask. It should be used for
> non-monitor command errors and warnings.
>
> Having said that, I think we should use hw_error() or fprintf() in
> this patch until qemu_log_mask() replaces them.
Nack. Like I just pointed out, hw_error() is a fatal abort and not a
replacement for logging. I don't mind which of the non-fatal logging
methods you choose, but guest-triggerable aborting is a semantic change
that we should not choose just because someone doesn't like logging API
or defaults. Especially not for 1.4.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-02-11 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 22:12 [Qemu-trivial] [PATCH] ide: log error when trying to use ATAPI overlapping features Hervé Poussineau
2013-02-11 13:27 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
2013-02-11 13:33 ` Kevin Wolf
2013-02-11 14:01 ` Markus Armbruster
2013-02-11 14:19 ` Andreas Färber
2013-02-11 14:34 ` Peter Maydell
2013-02-11 14:57 ` Stefan Hajnoczi
2013-02-11 15:03 ` Peter Maydell
2013-02-11 15:10 ` Andreas Färber [this message]
2013-02-12 7:55 ` Stefan Hajnoczi
2013-02-11 15:10 ` Peter Maydell
2013-02-11 21:08 ` Hervé Poussineau
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=511909F6.7060002@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=hpoussin@reactos.org \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@gmail.com \
/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.