From: Vishal Chourasia <vishalc@linux.ibm.com>
To: adityag@linux.ibm.com, harshpb@linux.ibm.com,
milesg@linux.ibm.com, npiggin@gmail.com,
peter.maydell@linaro.org, qemu-devel@nongnu.org,
qemu-ppc@nongnu.org, berrange@redhat.com
Cc: Vishal Chourasia <vishalc@linux.ibm.com>
Subject: [PATCH v3 0/5] hw/core/loader: Add Error parameter for better error reporting
Date: Thu, 16 Oct 2025 23:04:56 +0530 [thread overview]
Message-ID: <20251016173502.1261674-1-vishalc@linux.ibm.com> (raw)
Currently, when QEMU fails to load images (kernel, BIOS, initrd) via
load_image_targphys(), the error messages are not descriptive enough
for users to understand why the loading failed. This series adds the
ability to pass Error information through the loader functions to
provide more detailed error reporting.
v2:
- Use qemu_open() instead of open() in get_image_size() (danpb)
- Remove redundant error_setg_file_open() call (danpb)
- Use error_prepend()/error_reportf_err() to preserve underlying
error details (danpb)
Vishal Chourasia (5):
hw/core/loader: capture Error from load_image_targphys
hw/core/loader: Use qemu_open() instead of open() in get_image_size()
hw/core: Pass errp to load_image_targphys_as()
hw/ppc/spapr: Rename resize_hpt_err to errp
hw/ppc: Pass errp to load_image_targphys() and report errors
hw/alpha/dp264.c | 4 ++--
hw/arm/armv7m.c | 2 +-
hw/arm/boot.c | 5 +++--
hw/arm/digic_boards.c | 2 +-
hw/arm/highbank.c | 3 ++-
hw/arm/raspi.c | 2 +-
hw/arm/vexpress.c | 2 +-
hw/core/generic-loader.c | 5 +++--
hw/core/guest-loader.c | 4 ++--
hw/core/loader.c | 34 +++++++++++++++++++++++++---------
hw/hppa/machine.c | 5 +++--
hw/i386/multiboot.c | 2 +-
hw/i386/x86-common.c | 4 ++--
hw/ipmi/ipmi_bmc_sim.c | 2 +-
hw/loongarch/boot.c | 5 ++---
hw/m68k/an5206.c | 2 +-
hw/m68k/mcf5208.c | 4 ++--
hw/m68k/next-cube.c | 2 +-
hw/m68k/q800.c | 7 ++++---
hw/m68k/virt.c | 4 ++--
hw/microblaze/boot.c | 5 +++--
hw/mips/boston.c | 2 +-
hw/mips/fuloong2e.c | 9 +++++----
hw/mips/jazz.c | 2 +-
hw/mips/loongson3_virt.c | 10 ++++++----
hw/mips/malta.c | 9 +++++----
hw/nubus/nubus-device.c | 2 +-
hw/openrisc/boot.c | 5 +++--
hw/pci/pci.c | 2 +-
hw/ppc/amigaone.c | 11 ++++++-----
hw/ppc/e500.c | 14 ++++++++------
hw/ppc/mac_newworld.c | 20 ++++++++++++--------
hw/ppc/mac_oldworld.c | 20 ++++++++++++--------
hw/ppc/pegasos2.c | 12 +++++++-----
hw/ppc/pnv.c | 20 ++++++++++++--------
hw/ppc/ppc440_bamboo.c | 8 +++++---
hw/ppc/prep.c | 19 +++++++++++--------
hw/ppc/sam460ex.c | 8 +++++---
hw/ppc/spapr.c | 28 +++++++++++++++-------------
hw/ppc/virtex_ml507.c | 10 ++++++----
hw/riscv/boot.c | 7 ++++---
hw/rx/rx-gdbsim.c | 2 +-
hw/s390x/ipl.c | 8 +++++---
hw/sh4/r2d.c | 8 +++++---
hw/smbios/smbios.c | 2 +-
hw/sparc/leon3.c | 4 ++--
hw/sparc/sun4m.c | 8 +++++---
hw/sparc64/sun4u.c | 7 ++++---
hw/xtensa/xtfpga.c | 3 ++-
include/hw/loader.h | 8 +++++---
system/device_tree.c | 2 +-
51 files changed, 220 insertions(+), 155 deletions(-)
--
2.51.0
next reply other threads:[~2025-10-16 17:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 17:34 Vishal Chourasia [this message]
2025-10-16 17:34 ` [PATCH 1/5] hw/core/loader: capture Error from load_image_targphys Vishal Chourasia
2025-10-16 22:58 ` Alistair Francis
2025-10-17 5:49 ` Vishal Chourasia
2025-10-16 17:34 ` [PATCH 2/5] hw/core/loader: Use qemu_open() instead of open() in get_image_size() Vishal Chourasia
2025-10-16 17:40 ` Daniel P. Berrangé
2025-10-16 17:35 ` [PATCH 3/5] hw/core: Pass errp to load_image_targphys_as() Vishal Chourasia
2025-10-16 22:59 ` Alistair Francis
2025-10-17 4:52 ` Vishal Chourasia
2025-10-16 17:35 ` [PATCH 4/5] hw/ppc/spapr: Rename resize_hpt_err to errp Vishal Chourasia
2025-10-16 17:35 ` [PATCH 5/5] hw/ppc: Pass errp to load_image_targphys() and report errors Vishal Chourasia
2025-10-16 19:27 ` BALATON Zoltan
2025-10-16 20:26 ` Vishal Chourasia
2025-10-17 6:08 ` Vishal Chourasia
2025-10-17 4:54 ` Aditya Gupta
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=20251016173502.1261674-1-vishalc@linux.ibm.com \
--to=vishalc@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=berrange@redhat.com \
--cc=harshpb@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).