qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio: Add function name to error messages
@ 2025-09-15 10:01 Alessandro Ratti
  2025-09-15 10:01 ` Alessandro Ratti
  0 siblings, 1 reply; 16+ messages in thread
From: Alessandro Ratti @ 2025-09-15 10:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: alessandro.ratti, philmd, alex.bennee


Hi,

In a previous attempt [1] to improve virtio error messages I didn’t fully
understand the suggestion made by Alex Bennée in a previous attempt [2].

This patch implements his idea more faithfully: instead of hard-coding a
"virtio" prefix at the call sites, we prepend the function name within
virtio_error() itself. This centralizes the change, avoids duplication,
and makes the log messages more informative.

For example, after forcibly triggering an error inside
virtio_init_region_cache(), the resulting output now shows the function
context clearly:

    ~/qemu/build$ sudo ./qemu-system-x86_64  \
    -enable-kvm   \
    -m 512   \
    -drive \
    if=virtio,file=/tmp/some.img,format=raw
    qemu-system-x86_64: virtio_init_region_cache: Cannot map used
    qemu-system-x86_64: virtio_init_region_cache: Cannot map used
    ...

This should address the original concern in a cleaner and more
maintainable way.

Thank you for your time and consideration.

Best regards,
Alessandro Ratti

[1]: https://lore.kernel.org/qemu-devel/20250830093844.452039-2-alessandro@0x65c.net/T/#t
[2]: https://patchwork.kernel.org/project/qemu-devel/patch/20220414112902.41390-1-codeguy.moteen@gmail.com/


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-09-23 13:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 10:01 [PATCH] virtio: Add function name to error messages Alessandro Ratti
2025-09-15 10:01 ` Alessandro Ratti
2025-09-15 10:35   ` Alex Bennée
2025-09-15 16:19     ` Alessandro Ratti
2025-09-15 16:19       ` [PATCH v2] " Alessandro Ratti
2025-09-22  9:33         ` Alessandro Ratti
2025-09-22  9:33           ` Alessandro Ratti
2025-09-22 10:37           ` Alex Bennée
2025-09-22 10:37         ` Markus Armbruster
2025-09-22 10:47           ` Daniel P. Berrangé
2025-09-22 11:06             ` Alex Bennée
2025-09-22 12:29               ` Markus Armbruster
2025-09-22 13:37                 ` Alessandro Ratti
2025-09-22 14:23                   ` Markus Armbruster
2025-09-23  9:42                     ` Alessandro Ratti
2025-09-23 13:33                       ` Markus Armbruster

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).