Skip to content

Don't abort when we can't allocate guest memory (again)

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4error: New error_fatalinclude/qapi/error.h util/error.c+32 -131 reply
2/4Fix bad error handling after memory_region_init_ram()hw/arm/armv7m.c hw/arm/exynos4210.c hw/arm/highbank.c +59 more+110 -1012 replies
3/4loader: Fix memory_region_init_resizeable_ram() error handlinghw/core/loader.c+1 -10 replies
4/4memory: Fix bad error handling in memory_region_init_ram_ptr()memory.c+1 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric BlakePeter Crosthwaite
SeriesR-b
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again)

Not nice:

    $ qemu-system-x86_64 -m 10000000
    Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456:
    upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate memory
    Aborted (core dumped)

I fixed this in commit 3922825 for v1.7, but commit ef701d7 regressed it for v2.2, and now I'm fixing it again, only this time the fix is fifteen times bigger.

Folks involved in the flawed commit cc'ed, so they can do penance by reviewing my fix ;-P

PATCH 1/4's error_fatal obviously enables further simplifications. I got some in my local tree, but they're not ready, yet.

Markus Armbruster (4):
error: New error_fatal
Fix bad error handling after memory_region_init_ram()
loader: Fix memory_region_init_resizeable_ram() error handling
memory: Fix bad error handling in memory_region_init_ram_ptr()

 hw/arm/armv7m.c                          |  2 +-
 hw/arm/exynos4210.c                      |  8 ++++----
 hw/arm/highbank.c                        |  2 +-
 hw/arm/integratorcp.c                    |  2 +-
 hw/arm/mainstone.c                       |  2 +-
 hw/arm/musicpal.c                        |  2 +-
 hw/arm/omap1.c                           |  2 +-
 hw/arm/omap2.c                           |  2 +-
 hw/arm/omap_sx1.c                        |  4 ++--
 hw/arm/palm.c                            |  2 +-
 hw/arm/pxa2xx.c                          |  8 ++++----
 hw/arm/realview.c                        |  6 +++---
 hw/arm/spitz.c                           |  2 +-
 hw/arm/stellaris.c                       |  4 ++--
 hw/arm/stm32f205_soc.c                   |  4 ++--
 hw/arm/tosa.c                            |  2 +-
 hw/arm/vexpress.c                        |  6 +++---
 hw/arm/xilinx_zynq.c                     |  2 +-
 hw/arm/xlnx-zynqmp.c                     |  2 +-
 hw/block/onenand.c                       |  2 +-
 hw/core/loader.c                         |  2 +-
 hw/cris/axis_dev88.c                     |  2 +-
 hw/display/cg3.c                         |  4 ++--
 hw/display/qxl.c                         |  6 +++---
 hw/display/sm501.c                       |  2 +-
 hw/display/tc6393xb.c                    |  2 +-
 hw/display/tcx.c                         |  4 ++--
 hw/display/vga.c                         |  2 +-
 hw/display/vmware_vga.c                  |  2 +-
 hw/i386/pc.c                             |  2 +-
 hw/i386/pc_sysfw.c                       |  4 ++--
 hw/input/milkymist-softusb.c             |  4 ++--
 hw/m68k/an5206.c                         |  2 +-
 hw/m68k/mcf5208.c                        |  2 +-
 hw/microblaze/petalogix_ml605_mmu.c      |  4 ++--
 hw/microblaze/petalogix_s3adsp1800_mmu.c |  4 ++--
 hw/mips/mips_fulong2e.c                  |  2 +-
 hw/mips/mips_jazz.c                      |  4 ++--
 hw/mips/mips_malta.c                     |  2 +-
 hw/mips/mips_mipssim.c                   |  2 +-
 hw/mips/mips_r4k.c                       |  2 +-
 hw/moxie/moxiesim.c                      |  4 ++--
 hw/net/milkymist-minimac2.c              |  2 +-
 hw/openrisc/openrisc_sim.c               |  2 +-
 hw/pci-host/prep.c                       |  2 +-
 hw/pci/pci.c                             |  2 +-
 hw/ppc/mac_newworld.c                    |  2 +-
 hw/ppc/mac_oldworld.c                    |  2 +-
 hw/ppc/ppc405_boards.c                   |  7 ++++---
 hw/ppc/ppc405_uc.c                       |  2 +-
 hw/s390x/s390-virtio-ccw.c               |  2 +-
 hw/s390x/sclp.c                          |  3 ++-
 hw/sh4/r2d.c                             |  2 +-
 hw/sh4/shix.c                            |  6 +++---
 hw/sparc/leon3.c                         |  2 +-
 hw/sparc/sun4m.c                         |  6 +++---
 hw/sparc64/sun4u.c                       |  4 ++--
 hw/tricore/tricore_testboard.c           | 18 +++++++++++------
 hw/unicore32/puv3.c                      |  2 +-
 hw/xtensa/sim.c                          |  4 ++--
 hw/xtensa/xtfpga.c                       |  7 ++++---
 include/qapi/error.h                     | 11 +++++++++++
 memory.c                                 |  2 +-
 numa.c                                   |  4 ++--
 util/error.c                             | 34 ++++++++++++++++++++------------
 xen-hvm.c                                |  2 +-
 66 files changed, 144 insertions(+), 116 deletions(-)
Signature · 1 line
2.4.3