All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <th.huth@posteo.de>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org
Cc: Thomas Huth <huth@tuxfamily.org>,
	Jason Wang <jasowang@redhat.com>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH] hw/m68k/mcf52xx: Replace hw_error() by qemu_log_mask()
Date: Mon, 18 May 2020 19:17:41 +0200	[thread overview]
Message-ID: <8092949e-43fc-f45f-a5e4-f16981657967@posteo.de> (raw)
In-Reply-To: <6dc504aa-1fea-e5dd-1ba9-d1d59fbcb198@amsat.org>

On 18/05/2020 19.08, Philippe Mathieu-Daudé wrote:
> On 5/18/20 6:32 PM, Thomas Huth wrote:
>> On 18/05/2020 11.49, Philippe Mathieu-Daudé wrote:
>>> hw_error() calls exit(). This a bit overkill when we can log
>>> the accesses as unimplemented or guest error.
>>
>> Good idea. hw_error() is also mainly for CPU errors, it really should
>> not be used for non-CPU devices.
> 
> Are you sure?
> 
> $ git grep hw_error target | wc -l
> 5
> $ git grep hw_error hw | wc -l
> 137

Well, the function is defined in cpus.c and it's dumping the state of
each CPU ... I think it's used in a lot of places during development of
new code to quickly get some information on where things went wrong in
the guest, but technically, it really sounds wrong to me that a non-CPU
device creates CPU dumps in mature code.

 Thomas


  reply	other threads:[~2020-05-18 17:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  9:49 [PATCH] hw/m68k/mcf52xx: Replace hw_error() by qemu_log_mask() Philippe Mathieu-Daudé
2020-05-18 16:32 ` Thomas Huth
2020-05-18 16:58   ` Philippe Mathieu-Daudé
2020-05-18 17:08   ` Philippe Mathieu-Daudé
2020-05-18 17:17     ` Thomas Huth [this message]
2020-05-18 17:24       ` Philippe Mathieu-Daudé

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=8092949e-43fc-f45f-a5e4-f16981657967@posteo.de \
    --to=th.huth@posteo.de \
    --cc=f4bug@amsat.org \
    --cc=huth@tuxfamily.org \
    --cc=jasowang@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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.