Skip to content

Fix error handling for callers of load_image_targphys, get_image_size, event_notifier_init, msix_init

Trieu Huynh qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/24 patches 6 repliesIn review
  2. v3 posting 1/24 patches 0 repliesSuperseded
  3. v24 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches10 repliesSuperseded

Changes in v3 from the cover letter

- Patch 1: For next-cube, use a local Error* instead of &error_fatal so that load failures are reported only when !qtest_enabled(), matching the existing guard. Distinguishes "file not found" (error set) from "file too short" (no error, size < 8) in next-cube. (pointed out by Peter Maydell)
- Patch 2: Drop leon3.c change: warning is meaningless for baremetal programs where no BIOS is expected, and error handling already exists downstream. (pointed out by Clément Chigot)
- Patch 3: No code changes. Add Reviewed-by tags.
- Patch 4: Replace error_propagate() with conditional errp passing:
(s->msix == ON_OFF_AUTO_ON ? errp : NULL), avoiding the need for a local error variable. (pointed out by Akihiko Odaki)

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/core/loader: fix error handling for load_image_targphys callershw/alpha/dp264.c hw/hppa/machine.c hw/m68k/next-cube.c +3 more+15 -71 reply
2/4hw/core/loader: fix error handling for get_image_size callershw/ipmi/ipmi_bmc_sim.c+2 -03 replies
3/4util/event_notifier: fix error handling for event_notifier_init callershw/hyperv/hyperv.c hw/hyperv/vmbus.c hw/remote/proxy.c +5 more+23 -120 replies
4/4hw/pci/msix: fix error handling for msix_init callershw/net/igbvf.c hw/net/rocker/rocker.c hw/pci/msix.c +2 more+25 -131 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAnthony KrowiakJagannathan RamanMaciej S. SzmigieroMatthew RosatoPeter Maydell
1/4R-b
2/4R-b
3/4A-b R-b R-b R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/4] Fix error handling for callers of load_image_targphys, get_image_size, event_notifier_init, msix_init

Changes in v3:
- Patch 1: For next-cube, use a local Error* instead of &error_fatal so that load failures are reported only when !qtest_enabled(), matching the existing guard. Distinguishes "file not found" (error set) from "file too short" (no error, size < 8) in next-cube. (pointed out by Peter Maydell)
- Patch 2: Drop leon3.c change: warning is meaningless for baremetal programs where no BIOS is expected, and error handling already exists downstream. (pointed out by Clément Chigot)
- Patch 3: No code changes. Add Reviewed-by tags.
- Patch 4: Replace error_propagate() with conditional errp passing:
(s->msix == ON_OFF_AUTO_ON ? errp : NULL), avoiding the need for a local error variable. (pointed out by Akihiko Odaki)

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/413

Trieu Huynh (4):
hw/core/loader: fix error handling for load_image_targphys callers hw/core/loader: fix error handling for get_image_size callers util/event_notifier: fix error handling for event_notifier_init
callers
hw/pci/msix: fix error handling for msix_init callers

 hw/alpha/dp264.c       |  2 +-
 hw/hppa/machine.c      |  2 +-
 hw/hyperv/hyperv.c     |  4 ++--
 hw/hyperv/vmbus.c      |  4 ++--
 hw/ipmi/ipmi_bmc_sim.c |  2 ++
 hw/m68k/next-cube.c    | 11 +++++++++--
 hw/m68k/q800.c         |  2 +-
 hw/m68k/virt.c         |  2 +-
 hw/microblaze/boot.c   |  3 ++-
 hw/net/igbvf.c         |  2 +-
 hw/net/rocker/rocker.c |  2 +-
 hw/pci/msix.c          |  2 +-
 hw/remote/proxy.c      | 15 +++++++++++++--
 hw/scsi/megasas.c      | 16 +++++++++++-----
 hw/usb/hcd-xhci-pci.c  | 16 +++++++++++-----
 hw/vfio/ap.c           |  2 +-
 hw/vfio/ccw.c          |  2 +-
 hw/vfio/pci-quirks.c   |  2 +-
 hw/vfio/pci.c          |  2 +-
 hw/virtio/vhost-vdpa.c |  4 ++--
 20 files changed, 65 insertions(+), 32 deletions(-)
Signature · 1 line
2.43.0