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

Trieu Huynh posted 4 patches 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260318141415.8538-1-vikingtc4@gmail.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>, Corey Minyard <minyard@acm.org>, Thomas Huth <th.huth+qemu@posteo.eu>, Laurent Vivier <laurent@vivier.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>, Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>, Jason Wang <jasowang@redhat.com>, Jiri Pirko <jiri@resnulli.us>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>
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(-)
[PATCH v3 0/4] Fix error handling for callers of load_image_targphys, get_image_size, event_notifier_init, msix_init
Posted by Trieu Huynh 2 weeks, 5 days ago
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(-)

-- 
2.43.0


Re: [PATCH v3 0/4] Fix error handling for callers of load_image_targphys, get_image_size, event_notifier_init, msix_init
Posted by Philippe Mathieu-Daudé 1 week, 6 days ago
On 18/3/26 15:14, Trieu Huynh wrote:

> 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

Merged as commits b06bb02721a98d5b42...08324de90d1036326f, thanks.