qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Patch v4 0/5] hw/core/loader: capture Error from load_image_targphys
@ 2025-10-17 18:12 Vishal Chourasia
  2025-10-17 18:12 ` [Patch v4 1/5] " Vishal Chourasia
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Vishal Chourasia @ 2025-10-17 18:12 UTC (permalink / raw)
  To: adityag, harshpb, milesg, npiggin, peter.maydell, alistair23,
	balaton, qemu-devel, qemu-ppc, berrange
  Cc: Vishal Chourasia

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.

v4:
- Reject empty files (`size == 0`) with an appropriate error. [1/5]
- Populate error when `rom_add_file_fixed_as()` fails. [1/5]
- Add missing check in hw/ppc/virtex_ml507.c [5/5]
- Fixed checkpatch warnings [5/5]
- Check errp for failures from load_image_targphys/load_image_targphys_as [3,5/5]
- Remove unused variables [5/5]

v3:
- 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 |  8 +++++---
 hw/core/guest-loader.c   |  7 ++++---
 hw/core/loader.c         | 41 +++++++++++++++++++++++++++++++---------
 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        | 15 ++++++++-------
 hw/ppc/e500.c            | 18 ++++++++++--------
 hw/ppc/mac_newworld.c    | 29 ++++++++++++++++++----------
 hw/ppc/mac_oldworld.c    | 29 ++++++++++++++++++----------
 hw/ppc/pegasos2.c        | 18 ++++++++++++------
 hw/ppc/pnv.c             | 30 ++++++++++++++---------------
 hw/ppc/ppc440_bamboo.c   | 10 ++++++----
 hw/ppc/prep.c            | 27 ++++++++++++++++----------
 hw/ppc/sam460ex.c        | 10 ++++++----
 hw/ppc/spapr.c           | 35 +++++++++++++++++-----------------
 hw/ppc/virtex_ml507.c    | 18 ++++++++++++------
 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, 274 insertions(+), 183 deletions(-)

-- 
2.51.0



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

end of thread, other threads:[~2025-10-21  8:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 18:12 [Patch v4 0/5] hw/core/loader: capture Error from load_image_targphys Vishal Chourasia
2025-10-17 18:12 ` [Patch v4 1/5] " Vishal Chourasia
2025-10-17 19:25   ` BALATON Zoltan
2025-10-21  8:31     ` Vishal Chourasia
2025-10-17 18:12 ` [Patch v4 2/5] hw/core/loader: Use qemu_open() instead of open() in get_image_size() Vishal Chourasia
2025-10-17 19:27   ` BALATON Zoltan
2025-10-17 18:12 ` [Patch v4 3/5] hw/core: Pass errp to load_image_targphys_as() Vishal Chourasia
2025-10-17 18:12 ` [Patch v4 4/5] hw/ppc/spapr: Rename resize_hpt_err to errp Vishal Chourasia
2025-10-17 18:24 ` [Patch v4 5/5] hw/ppc: Pass errp to load_image_targphys() and report errors Vishal Chourasia
2025-10-17 19:41   ` BALATON Zoltan
2025-10-21  8:36     ` Vishal Chourasia

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